Class: Cask::DSL::Appcast Private

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

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.

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. 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 a new instance of Appcast.



12
13
14
15
16
# File '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. 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.



10
11
12
# File 'cask/dsl/appcast.rb', line 10

def must_contain
  @must_contain
end

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



10
11
12
# File 'cask/dsl/appcast.rb', line 10

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



10
11
12
# File 'cask/dsl/appcast.rb', line 10

def uri
  @uri
end

Instance Method Details

#to_sObject

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.



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

def to_s
  uri.to_s
end

#to_yamlObject

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.



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

def to_yaml
  [uri, parameters].to_yaml
end