Class: Cask::DSL::Appcast Private

Inherits:
Object
  • Object
show all
Defined in:
Library/Homebrew/cask/dsl/appcast.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 appcast stanza.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(uri, **parameters) ⇒ Appcast

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


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

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

Instance Attribute Details

#must_containObject (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/dsl/appcast.rb', line 10

def must_contain
  @must_contain
end

#parametersObject (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/dsl/appcast.rb', line 10

def parameters
  @parameters
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/dsl/appcast.rb', line 10

def uri
  @uri
end

Instance Method Details

#to_sObject

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.


22
23
24
# File 'Library/Homebrew/cask/dsl/appcast.rb', line 22

def to_s
  uri.to_s
end

#to_yamlObject

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.


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

def to_yaml
  [uri, parameters].to_yaml
end