Class: Provisioner::Configuration

Inherits:
OpenStruct
  • Object
show all
Defined in:
lib/provisioner/configuration.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.from_path(path) ⇒ Object



8
9
10
# File 'lib/provisioner/configuration.rb', line 8

def from_path(path)
  self.new(YAML.load_file(path))
end

Instance Method Details

#allObject



19
20
21
# File 'lib/provisioner/configuration.rb', line 19

def all
  templates.map { |k, v| {k => v.merge(global)} }
end

#for_template(name) ⇒ Object



13
14
15
16
17
# File 'lib/provisioner/configuration.rb', line 13

def for_template(name)
  validate_template(name)

  templates[name].merge(global)
end