Class: Cask::URL::DSL Private

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

Overview

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.

Methods for the url stanza.

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:



78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# File 'cask/url.rb', line 78

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 = T.let(URI(uri), T.any(URI::Generic, String))

  header = Array(header) unless header.nil?

  specs = {}
  specs[:verified]   = @verified   = T.let(verified, T.nilable(String))
  specs[:using]      = @using      = T.let(using, T.any(T::Class[AbstractDownloadStrategy], Symbol, NilClass))
  specs[:tag]        = @tag        = T.let(tag, T.nilable(String))
  specs[:branch]     = @branch     = T.let(branch, T.nilable(String))
  specs[:revisions]  = @revisions  = T.let(revisions, T.nilable(T::Hash[T.any(Symbol, String), String]))
  specs[:revision]   = @revision   = T.let(revision, T.nilable(String))
  specs[:trust_cert] = @trust_cert = T.let(trust_cert, T.nilable(T::Boolean))
  specs[:cookies]    = @cookies    = T.let(cookies, T.nilable(T::Hash[String, String]))
  specs[:referer]    = @referer    = T.let(referer, T.nilable(T.any(URI::Generic, String)))
  specs[:headers]    = @header     = T.let(header, T.nilable(T.any(String, T::Array[String])))
  specs[:user_agent] = @user_agent = T.let(user_agent || :default, T.nilable(T.any(Symbol, String)))
  specs[:data]       = @data       = T.let(data, T.nilable(T::Hash[String, String]))
  specs[:only_path]  = @only_path  = T.let(only_path, T.nilable(String))

  @specs = T.let(specs.compact, T::Hash[Symbol, T.untyped])
end

Instance Attribute Details

#branchString? (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:



44
45
46
# File 'cask/url.rb', line 44

def branch
  @branch
end

#cookiesHash{String => String}? (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:



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

def cookies
  @cookies
end

#dataHash{String => String}? (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:



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

def data
  @data
end

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



29
30
31
# File 'cask/url.rb', line 29

def header
  @header
end

#only_pathString? (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:



44
45
46
# File 'cask/url.rb', line 44

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:



32
33
34
# File 'cask/url.rb', line 32

def referer
  @referer
end

#revisionString? (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:



44
45
46
# File 'cask/url.rb', line 44

def revision
  @revision
end

#revisionsHash{Symbol, String => String}? (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:



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

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:



35
36
37
# File 'cask/url.rb', line 35

def specs
  @specs
end

#tagString? (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:



44
45
46
# File 'cask/url.rb', line 44

def tag
  @tag
end

#trust_certBoolean? (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:

  • (Boolean, nil)


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

def trust_cert
  @trust_cert
end

#uriURI::Generic, String (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:



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

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:



38
39
40
# File 'cask/url.rb', line 38

def user_agent
  @user_agent
end

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



41
42
43
# File 'cask/url.rb', line 41

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:



44
45
46
# File 'cask/url.rb', line 44

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