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

Instance Attribute Details

#urlURI::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

Returns:

  • (URI::Generic)


116
117
118
# File 'cask/url.rb', line 116

def url
  @url
end