Class: Nebula::Dsl::ComputeNode

Inherits:
Object
  • Object
show all
Defined in:
lib/nebula/dsl.rb

Instance Method Summary collapse

Constructor Details

#initialize(name, &block) ⇒ ComputeNode

Returns a new instance of ComputeNode.



58
59
60
61
62
63
# File 'lib/nebula/dsl.rb', line 58

def initialize(name, &block)
  @name = name
  @run_list = []
  @override_attributes = {}
  instance_eval(&block)
end

Instance Method Details

#override_attributes(atts) ⇒ Object



73
74
75
# File 'lib/nebula/dsl.rb', line 73

def override_attributes(atts)
  @override_attributes.merge!(atts)
end

#recipe(name) ⇒ Object



69
70
71
# File 'lib/nebula/dsl.rb', line 69

def recipe(name)
  @run_list << "recipe[#{name}]"
end

#role(name) ⇒ Object



65
66
67
# File 'lib/nebula/dsl.rb', line 65

def role(name)
  @run_list << "role[#{name}]"
end