Class: Cask::DSL::Appcast

Inherits:
Object
  • Object
show all
Defined in:
brew/Library/Homebrew/cask/dsl/appcast.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(uri, **parameters) ⇒ Appcast

Returns a new instance of Appcast



8
9
10
11
12
# File 'brew/Library/Homebrew/cask/dsl/appcast.rb', line 8

def initialize(uri, **parameters)
  @uri        = URI(uri)
  @parameters = parameters
  @configuration = parameters[:configuration] if parameters.key?(:configuration)
end

Instance Attribute Details

#configurationObject (readonly)

Returns the value of attribute configuration



6
7
8
# File 'brew/Library/Homebrew/cask/dsl/appcast.rb', line 6

def configuration
  @configuration
end

#parametersObject (readonly)

Returns the value of attribute parameters



6
7
8
# File 'brew/Library/Homebrew/cask/dsl/appcast.rb', line 6

def parameters
  @parameters
end

#uriObject (readonly)

Returns the value of attribute uri



6
7
8
# File 'brew/Library/Homebrew/cask/dsl/appcast.rb', line 6

def uri
  @uri
end

Instance Method Details

#to_sObject



18
19
20
# File 'brew/Library/Homebrew/cask/dsl/appcast.rb', line 18

def to_s
  uri.to_s
end

#to_yamlObject



14
15
16
# File 'brew/Library/Homebrew/cask/dsl/appcast.rb', line 14

def to_yaml
  [uri, parameters].to_yaml
end