Class: Spice::Node
Instance Attribute Summary collapse
-
#_rev ⇒ Object
readonly
Returns the value of attribute _rev.
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
-
#automatic ⇒ Object
readonly
Returns the value of attribute automatic.
-
#chef_environment ⇒ Object
readonly
Returns the value of attribute chef_environment.
-
#chef_type ⇒ Object
readonly
Returns the value of attribute chef_type.
-
#default ⇒ Object
readonly
Returns the value of attribute default.
-
#defaults ⇒ Object
readonly
Returns the value of attribute defaults.
-
#json_class ⇒ Object
readonly
Returns the value of attribute json_class.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#normal ⇒ Object
readonly
Returns the value of attribute normal.
-
#override ⇒ Object
readonly
Returns the value of attribute override.
-
#overrides ⇒ Object
readonly
Returns the value of attribute overrides.
-
#run_list ⇒ Object
readonly
Returns the value of attribute run_list.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(attrs = Mash.new) ⇒ Node
constructor
A new instance of Node.
Methods inherited from Base
#[], attr_reader, get, get_or_new, #id, identity_map, #keys, #update
Constructor Details
#initialize(attrs = Mash.new) ⇒ Node
Returns a new instance of Node.
9 10 11 12 13 14 15 16 |
# File 'lib/spice/node.rb', line 9 def initialize(attrs=Mash.new) super @attrs['json_class'] ||= "Chef::Node" @attrs['chef_type'] ||= 'node' @attrs['attributes'] ||= Mash.new @attrs['overrides'] ||= Mash.new @attrs['run_list'] ||= [] end |
Instance Attribute Details
#_rev ⇒ Object (readonly)
Returns the value of attribute _rev.
5 6 7 |
# File 'lib/spice/node.rb', line 5 def _rev @_rev end |
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
5 6 7 |
# File 'lib/spice/node.rb', line 5 def attributes @attributes end |
#automatic ⇒ Object (readonly)
Returns the value of attribute automatic.
5 6 7 |
# File 'lib/spice/node.rb', line 5 def automatic @automatic end |
#chef_environment ⇒ Object (readonly)
Returns the value of attribute chef_environment.
5 6 7 |
# File 'lib/spice/node.rb', line 5 def chef_environment @chef_environment end |
#chef_type ⇒ Object (readonly)
Returns the value of attribute chef_type.
5 6 7 |
# File 'lib/spice/node.rb', line 5 def chef_type @chef_type end |
#default ⇒ Object (readonly)
Returns the value of attribute default.
5 6 7 |
# File 'lib/spice/node.rb', line 5 def default @default end |
#defaults ⇒ Object (readonly)
Returns the value of attribute defaults.
5 6 7 |
# File 'lib/spice/node.rb', line 5 def defaults @defaults end |
#json_class ⇒ Object (readonly)
Returns the value of attribute json_class.
5 6 7 |
# File 'lib/spice/node.rb', line 5 def json_class @json_class end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/spice/node.rb', line 5 def name @name end |
#normal ⇒ Object (readonly)
Returns the value of attribute normal.
5 6 7 |
# File 'lib/spice/node.rb', line 5 def normal @normal end |
#override ⇒ Object (readonly)
Returns the value of attribute override.
5 6 7 |
# File 'lib/spice/node.rb', line 5 def override @override end |
#overrides ⇒ Object (readonly)
Returns the value of attribute overrides.
5 6 7 |
# File 'lib/spice/node.rb', line 5 def overrides @overrides end |
#run_list ⇒ Object (readonly)
Returns the value of attribute run_list.
5 6 7 |
# File 'lib/spice/node.rb', line 5 def run_list @run_list end |