Module: Cask::URL::BlockDSL::PageWithURL Private
- Defined in:
- cask/url.rb
Overview
This module is part of a private API. This module may only be used in the Homebrew/brew repository. Third parties should avoid using this module if possible, as it may be removed or changed without warning.
Allow accessing the URL associated with page contents.
Instance Attribute Summary collapse
-
#url ⇒ URI::Generic
Get the URL of the fetched page.
Instance Attribute Details
#url ⇒ URI::Generic
Get the URL of the fetched page.
Example
url "https://example.org/download" do |page|
file = page[/href="([^"]+.dmg)"/, 1]
URL.join(page.url, file)
end
117 118 119 |
# File 'cask/url.rb', line 117 def url @url end |