Class: Cask::URL::DSL Private

Inherits:
Object show all
Extended by:
Forwardable
Defined in:
cask/url.rb,
sorbet/rbi/dsl/cask/url/dsl.rbi

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, only_path: nil) ⇒ void

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.

Parameters:

  • uri (URI::Generic, String)
  • verified (String, nil) (defaults to: nil)
  • using (Class, 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, Array<String>, nil) (defaults to: nil)
  • user_agent (Symbol, String, nil) (defaults to: nil)
  • data (Hash{String => String}, nil) (defaults to: nil)
  • only_path (String, nil) (defaults to: nil)


61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
# File 'cask/url.rb', line 61

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,
  only_path: nil
)

  @uri = URI(uri)

  header = Array(header) unless header.nil?

  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[:headers]    = @header     = header
  specs[:user_agent] = @user_agent = user_agent || :default
  specs[:data]       = @data       = data
  specs[:only_path]  = @only_path  = only_path

  @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.



11
12
13
# File 'cask/url.rb', line 11

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.



11
12
13
# File 'cask/url.rb', line 11

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.



11
12
13
# File 'cask/url.rb', line 11

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.



11
12
13
# File 'cask/url.rb', line 11

def header
  @header
end

#only_pathObject (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.



11
12
13
# File 'cask/url.rb', line 11

def only_path
  @only_path
end

#refererURI::Generic, ... (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.

Returns:



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

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.



11
12
13
# File 'cask/url.rb', line 11

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.



11
12
13
# File 'cask/url.rb', line 11

def revisions
  @revisions
end

#specsHash{Symbol => T.untyped} (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.

Returns:



18
19
20
# File 'cask/url.rb', line 18

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.



11
12
13
# File 'cask/url.rb', line 11

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.



11
12
13
# File 'cask/url.rb', line 11

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.



11
12
13
# File 'cask/url.rb', line 11

def uri
  @uri
end

#user_agentSymbol, ... (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.

Returns:



21
22
23
# File 'cask/url.rb', line 21

def user_agent
  @user_agent
end

#usingT::Class[T.anything], ... (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.

Returns:

  • (T::Class[T.anything], Symbol, nil)


24
25
26
# File 'cask/url.rb', line 24

def using
  @using
end

#verifiedString? (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.

Returns:



27
28
29
# File 'cask/url.rb', line 27

def verified
  @verified
end

Instance Method Details

#path(*args, &block) ⇒ T.untyped

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.

Parameters:

  • args (T.untyped)
  • block (T.untyped)

Returns:

  • (T.untyped)


10
# File 'sorbet/rbi/dsl/cask/url/dsl.rbi', line 10

def path(*args, &block); end

#scheme(*args, &block) ⇒ T.untyped

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.

Parameters:

  • args (T.untyped)
  • block (T.untyped)

Returns:

  • (T.untyped)


13
# File 'sorbet/rbi/dsl/cask/url/dsl.rbi', line 13

def scheme(*args, &block); end