Class Chef::Node::Attribute
In: lib/chef/node/attribute.rb
Parent: Object

Methods

Included Modules

Enumerable

Constants

HIDDEN_ATTRIBUES = [:@override, :@attribute, :@default, :@normal, :@automatic]

Attributes

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] 

Public Class methods

Public Instance methods

attribute?(key)

Alias for has_key?

include?(key)

Alias for has_key?

key?(key)

Alias for has_key?

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. :)

length()

Alias for size

member?(key)

Alias for has_key?

Fetches or sets the value, depending on if any arguments are given.

Fetching

If no arguments are given, fetches the value:

  node.network
  => {network data}

Getters will find either a string or symbol key.

Setting

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"

Reset our internal current_nesting_level to the top of every tree

value?(value)

Alias for has_value?

[Validate]