Class: URL Private

Inherits:
Object
  • Object
show all
Extended by:
Forwardable, T::Sig
Defined in:
Library/Homebrew/cask/url.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Class corresponding to the url stanza.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(uri, using: nil, tag: nil, branch: nil, revisions: nil, revision: nil, trust_cert: nil, cookies: nil, referer: nil, header: nil, user_agent: nil, data: nil) ⇒ URL

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of URL.


35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# File 'Library/Homebrew/cask/url.rb', line 35

def initialize(
  uri,
  using: nil,
  tag: nil,
  branch: nil,
  revisions: nil,
  revision: nil,
  trust_cert: nil,
  cookies: nil,
  referer: nil,
  header: nil,
  user_agent: nil,
  data: nil
)
  @uri = URI(uri)

  specs = {}
  specs[:using]      = @using      = using
  specs[:tag]        = @tag        = tag
  specs[:branch]     = @branch     = branch
  specs[:revisions]  = @revisions  = revisions
  specs[:revision]   = @revision   = revision
  specs[:trust_cert] = @trust_cert = trust_cert
  specs[:cookies]    = @cookies    = cookies
  specs[:referer]    = @referer    = referer
  specs[:header]     = @header     = header
  specs[:user_agent] = @user_agent = user_agent || :default
  specs[:data]       = @data       = data

  @specs = specs.compact
end

Instance Attribute Details

#branchObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.


10
11
12
# File 'Library/Homebrew/cask/url.rb', line 10

def branch
  @branch
end

#cookiesObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.


10
11
12
# File 'Library/Homebrew/cask/url.rb', line 10

def cookies
  @cookies
end

#dataObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.


10
11
12
# File 'Library/Homebrew/cask/url.rb', line 10

def data
  @data
end

#headerObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.


10
11
12
# File 'Library/Homebrew/cask/url.rb', line 10

def header
  @header
end

#refererObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.


10
11
12
# File 'Library/Homebrew/cask/url.rb', line 10

def referer
  @referer
end

#revisionObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.


10
11
12
# File 'Library/Homebrew/cask/url.rb', line 10

def revision
  @revision
end

#revisionsObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.


10
11
12
# File 'Library/Homebrew/cask/url.rb', line 10

def revisions
  @revisions
end

#specsObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.


10
11
12
# File 'Library/Homebrew/cask/url.rb', line 10

def specs
  @specs
end

#tagObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.


10
11
12
# File 'Library/Homebrew/cask/url.rb', line 10

def tag
  @tag
end

#trust_certObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.


10
11
12
# File 'Library/Homebrew/cask/url.rb', line 10

def trust_cert
  @trust_cert
end

#uriObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.


10
11
12
# File 'Library/Homebrew/cask/url.rb', line 10

def uri
  @uri
end

#user_agentObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.


10
11
12
# File 'Library/Homebrew/cask/url.rb', line 10

def user_agent
  @user_agent
end

#usingObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.


10
11
12
# File 'Library/Homebrew/cask/url.rb', line 10

def using
  @using
end