class CfScript::Manifest
Constants
- FILENAME
Attributes
applications[R]
filename[R]
Public Class Methods
new(filename = FILENAME)
click to toggle source
# File lib/cf_script/manifest.rb, line 13 def initialize(filename = FILENAME) @filename = filename @applications = load_file end
Public Instance Methods
each() { |app| ... }
click to toggle source
# File lib/cf_script/manifest.rb, line 19 def each applications.each do |app| yield app end end
Private Instance Methods
load_file()
click to toggle source
# File lib/cf_script/manifest.rb, line 27 def load_file data = if File.exist?(filename) YAML.load(File.open(filename)) else { 'applications' => [] } end data['applications'].map do |app| OpenStruct.new(symbolize_keys(app)) end end