Class | Chef::Node::Attribute |
In: |
lib/chef/node/attribute.rb
|
Parent: | Object |
HIDDEN_ATTRIBUES | = | [:@override, :@attribute, :@default, :@normal, :@automatic] |
auto_vivifiy_on_read | [RW] | |
automatic | [RW] | |
current_automatic | [RW] | |
current_default | [RW] | |
current_normal | [RW] | |
current_override | [RW] | |
default | [RW] | |
normal | [RW] | |
override | [RW] | |
set_type | [RW] | |
set_unless_value_present | [RW] |
Writing this method hurts me a little bit.
TODO: Refactor all this stuff so this kind of horror is no longer needed
We have invented a new kind of duck-typing, we call it Madoff typing. We just lie and hope we die before you recognize our scheme. :)
Fetches or sets the value, depending on if any arguments are given.
If no arguments are given, fetches the value:
node.network => {network data}
Getters will find either a string or symbol key.
If arguments are given, a value will be set. Both normal setter and DSL style setters are allowed:
node.foo = "bar" node.foo("bar")
Both set node[:foo] = "bar"