Method: Chef::Node#attribute?

Defined in:
lib/chef/node.rb

#attribute?(attrib) ⇒ Boolean

Return true if this Node has a given attribute, false if not. Takes either a symbol or a string.

Only works on the top level. Preferred way is to use the normal [] style lookup and call attribute?()

Returns:

  • (Boolean)


247
248
249
# File 'lib/chef/node.rb', line 247

def attribute?(attrib)
  attributes.attribute?(attrib)
end