Class: URL::DSL Private

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

This class is part of a private API. This class may only be used in the Homebrew/brew repository. Third parties should avoid using this class if possible, as it may be removed or changed without warning.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

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

Parameters:

  • uri (URI::Generic, String)
  • verified (String, nil) (defaults to: nil)
  • using (Symbol, nil) (defaults to: nil)
  • tag (String, nil) (defaults to: nil)
  • branch (String, nil) (defaults to: nil)
  • revisions (Array<String>, nil) (defaults to: nil)
  • revision (String, nil) (defaults to: nil)
  • trust_cert (Boolean, nil) (defaults to: nil)
  • cookies (Hash{String => String}, nil) (defaults to: nil)
  • referer (URI::Generic, String, nil) (defaults to: nil)
  • header (String, nil) (defaults to: nil)
  • user_agent (Symbol, String, nil) (defaults to: nil)
  • data (Hash{String => String}, nil) (defaults to: nil)


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
66
67
68
69
70
71
72
73
74
# File 'cask/url.rb', line 41

def initialize(
  uri,
  verified: nil,
  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[:verified]   = @verified   = verified
  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. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.



14
15
16
# File 'cask/url.rb', line 14

def branch
  @branch
end

#cookiesObject (readonly)

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.



14
15
16
# File 'cask/url.rb', line 14

def cookies
  @cookies
end

#dataObject (readonly)

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.



14
15
16
# File 'cask/url.rb', line 14

def data
  @data
end

#headerObject (readonly)

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.



14
15
16
# File 'cask/url.rb', line 14

def header
  @header
end

#refererObject (readonly)

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.



14
15
16
# File 'cask/url.rb', line 14

def referer
  @referer
end

#revisionObject (readonly)

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.



14
15
16
# File 'cask/url.rb', line 14

def revision
  @revision
end

#revisionsObject (readonly)

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.



14
15
16
# File 'cask/url.rb', line 14

def revisions
  @revisions
end

#specsObject (readonly)

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.



14
15
16
# File 'cask/url.rb', line 14

def specs
  @specs
end

#tagObject (readonly)

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.



14
15
16
# File 'cask/url.rb', line 14

def tag
  @tag
end

#trust_certObject (readonly)

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.



14
15
16
# File 'cask/url.rb', line 14

def trust_cert
  @trust_cert
end

#uriObject (readonly)

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.



14
15
16
# File 'cask/url.rb', line 14

def uri
  @uri
end

#user_agentObject (readonly)

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.



14
15
16
# File 'cask/url.rb', line 14

def user_agent
  @user_agent
end

#usingObject (readonly)

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.



14
15
16
# File 'cask/url.rb', line 14

def using
  @using
end

#verifiedObject (readonly)

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.



14
15
16
# File 'cask/url.rb', line 14

def verified
  @verified
end