Exception: Chef::Exceptions::ImmutableAttributeModification

Inherits:
NoMethodError
  • Object
show all
Defined in:
lib/chef/exceptions.rb

Overview

Node::Attribute computes the merged version of of attributes and makes it read-only. Attempting to modify a read-only attribute will cause this error.

Instance Method Summary collapse

Constructor Details

#initializeImmutableAttributeModification

Returns a new instance of ImmutableAttributeModification.



228
229
230
231
# File 'lib/chef/exceptions.rb', line 228

def initialize
  super "Node attributes are read-only when you do not specify which precedence level to set. " +
    %q{To set an attribute use code like `node.default["key"] = "value"'}
end