Class: Ridley::Node
- Inherits:
-
Object
- Object
- Ridley::Node
- Includes:
- Resource
- Defined in:
- lib/ridley/resources/node.rb
Overview
Instance Method Summary collapse
- #automatic=(hash) ⇒ Object
- #default=(hash) ⇒ Object
- #normal=(hash) ⇒ Object
- #override=(hash) ⇒ Object
-
#set_default_attribute(key, value) ⇒ HashWithIndifferentAccess
Set a node level default attribute given the dotted path representation of the Chef attribute and value.
-
#set_normal_attribute(key, value) ⇒ HashWithIndifferentAccess
Set a node level normal attribute given the dotted path representation of the Chef attribute and value.
-
#set_override_attribute(key, value) ⇒ HashWithIndifferentAccess
Set a node level override attribute given the dotted path representation of the Chef attribute and value.
Methods included from Resource
#==, #attribute, #attribute=, #attribute?, #attributes, #attributes=, #chef_id, #eql?, #from_hash, #from_json, #initialize, #save, #to_hash, #to_json, #to_s
Instance Method Details
#automatic=(hash) ⇒ Object
22 23 24 |
# File 'lib/ridley/resources/node.rb', line 22 def automatic=(hash) super(HashWithIndifferentAccess.new(hash)) end |
#default=(hash) ⇒ Object
32 33 34 |
# File 'lib/ridley/resources/node.rb', line 32 def default=(hash) super(HashWithIndifferentAccess.new(hash)) end |
#normal=(hash) ⇒ Object
27 28 29 |
# File 'lib/ridley/resources/node.rb', line 27 def normal=(hash) super(HashWithIndifferentAccess.new(hash)) end |
#override=(hash) ⇒ Object
37 38 39 |
# File 'lib/ridley/resources/node.rb', line 37 def override=(hash) super(HashWithIndifferentAccess.new(hash)) end |
#set_default_attribute(key, value) ⇒ HashWithIndifferentAccess
Set a node level default attribute given the dotted path representation of the Chef attribute and value
72 73 74 75 |
# File 'lib/ridley/resources/node.rb', line 72 def set_default_attribute(key, value) attr_hash = HashWithIndifferentAccess.from_dotted_path(key, value) self.default = self.default.merge(attr_hash) end |
#set_normal_attribute(key, value) ⇒ HashWithIndifferentAccess
Set a node level normal attribute given the dotted path representation of the Chef attribute and value
90 91 92 93 |
# File 'lib/ridley/resources/node.rb', line 90 def set_normal_attribute(key, value) attr_hash = HashWithIndifferentAccess.from_dotted_path(key, value) self.normal = self.normal.merge(attr_hash) end |
#set_override_attribute(key, value) ⇒ HashWithIndifferentAccess
Set a node level override attribute given the dotted path representation of the Chef attribute and value
54 55 56 57 |
# File 'lib/ridley/resources/node.rb', line 54 def set_override_attribute(key, value) attr_hash = HashWithIndifferentAccess.from_dotted_path(key, value) self.override = self.override.merge(attr_hash) end |