Module: KnifeAttribute::Node::Helpers
Class Method Summary
collapse
Instance Method Summary
collapse
Methods included from Helpers
#attribute, #attribute_type_map, #default_attribute_type, #entity, #entity_name, #mapped_config, #value
Class Method Details
.included(base) ⇒ Object
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
# File 'lib/knife-attribute/node/helpers.rb', line 6
def self.included(base)
base.class_eval do
deps do
require 'chef/node'
require 'chef/json_compat'
end
def self.attribute_type_map
{
default: :default_attrs,
normal: :normal_attrs,
override: :override_attrs,
}
end
def self.default_attribute_type
:normal
end
end
end
|
Instance Method Details
#entity_type ⇒ Object
31
32
33
|
# File 'lib/knife-attribute/node/helpers.rb', line 31
def entity_type
:node
end
|
#node ⇒ Object
27
28
29
|
# File 'lib/knife-attribute/node/helpers.rb', line 27
def node
@node ||= Chef::Node.load(entity_name)
end
|