class Ridley::RoleObject
Public Instance Methods
set_default_attribute(key, value)
click to toggle source
Set a role level default attribute given the dotted path representation of the Chef
attribute and value
@example setting and saving a node level default attribute
obj = node.role("why_god_why") obj.set_default_attribute("my_app.billing.enabled", false) obj.save
@param [String] key @param [Object] value
@return [Hashie::Mash]
# File lib/ridley/chef_objects/role_object.rb, line 56 def set_default_attribute(key, value) attr_hash = Hashie::Mash.from_dotted_path(key, value) self.default_attributes = self.default_attributes.deep_merge(attr_hash) end
set_override_attribute(key, value)
click to toggle source
Set a role level override attribute given the dotted path representation of the Chef
attribute and value
@example setting and saving a node level override attribute
obj = node.role("why_god_why") obj.set_override_attribute("my_app.billing.enabled", false) obj.save
@param [String] key @param [Object] value
@return [Hashie::Mash]
# File lib/ridley/chef_objects/role_object.rb, line 38 def set_override_attribute(key, value) attr_hash = Hashie::Mash.from_dotted_path(key, value) self.override_attributes = self.override_attributes.deep_merge(attr_hash) end