Class: KnifeAttribute::Node::NodeAttributeGet

Inherits:
Chef::Knife
  • Object
show all
Includes:
CommonOptions, Helpers
Defined in:
lib/knife-attribute/node/get.rb

Instance Method Summary collapse

Methods included from Helpers

#attribute, included, #node, #node_name, #value

Methods included from Helpers

#mapped_config

Methods included from CommonOptions

#check_type, included

Instance Method Details

#runObject



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/knife-attribute/node/get.rb', line 9

def run
  check_arguments

  case config[:attribute_type]
  when 'default'
    get_attribute(node.default_attrs)
  when 'override'
    get_attribute(node.override_attrs)
  when 'automatic'
    get_attribute(node.automatic_attrs)
  when 'normal'
    get_attribute(node.normal_attrs)
  else
    get_attribute(node.construct_attributes)
  end
end