Class: Spice::Node

Inherits:
Base
  • Object
show all
Defined in:
lib/spice/node.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#attrs

Instance Method Summary collapse

Methods inherited from Base

#[], attr_reader, get, get_or_new, #id, identity_map, #keys, #update

Constructor Details

#initialize(attrs = Mash.new) ⇒ 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

#_revObject (readonly)

Returns the value of attribute _rev


5
6
7
# File 'lib/spice/node.rb', line 5

def _rev
  @_rev
end

#attributesObject (readonly)

Returns the value of attribute attributes


5
6
7
# File 'lib/spice/node.rb', line 5

def attributes
  @attributes
end

#automaticObject (readonly)

Returns the value of attribute automatic


5
6
7
# File 'lib/spice/node.rb', line 5

def automatic
  @automatic
end

#chef_environmentObject (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_typeObject (readonly)

Returns the value of attribute chef_type


5
6
7
# File 'lib/spice/node.rb', line 5

def chef_type
  @chef_type
end

#defaultObject (readonly)

Returns the value of attribute default


5
6
7
# File 'lib/spice/node.rb', line 5

def default
  @default
end

#defaultsObject (readonly)

Returns the value of attribute defaults


5
6
7
# File 'lib/spice/node.rb', line 5

def defaults
  @defaults
end

#json_classObject (readonly)

Returns the value of attribute json_class


5
6
7
# File 'lib/spice/node.rb', line 5

def json_class
  @json_class
end

#nameObject (readonly)

Returns the value of attribute name


5
6
7
# File 'lib/spice/node.rb', line 5

def name
  @name
end

#normalObject (readonly)

Returns the value of attribute normal


5
6
7
# File 'lib/spice/node.rb', line 5

def normal
  @normal
end

#overrideObject (readonly)

Returns the value of attribute override


5
6
7
# File 'lib/spice/node.rb', line 5

def override
  @override
end

#overridesObject (readonly)

Returns the value of attribute overrides


5
6
7
# File 'lib/spice/node.rb', line 5

def overrides
  @overrides
end

#run_listObject (readonly)

Returns the value of attribute run_list


5
6
7
# File 'lib/spice/node.rb', line 5

def run_list
  @run_list
end