Class: Chef::Attribute::Validator::AttributeSet
- Inherits:
-
Object
- Object
- Chef::Attribute::Validator::AttributeSet
- Extended by:
- Forwardable
- Defined in:
- lib/chef-attribute-validator/attribute_set.rb
Instance Attribute Summary collapse
-
#guts ⇒ Object
Returns the value of attribute guts.
-
#node ⇒ Object
Returns the value of attribute node.
-
#path ⇒ Object
Returns the value of attribute path.
Instance Method Summary collapse
-
#initialize(a_node, a_path) ⇒ AttributeSet
constructor
A new instance of AttributeSet.
Constructor Details
#initialize(a_node, a_path) ⇒ AttributeSet
Returns a new instance of AttributeSet.
19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/chef-attribute-validator/attribute_set.rb', line 19 def initialize(a_node, a_path) @guts = {} @path = a_path @node = a_node = Chef::Attribute::Validator::WildcardExpander.choose(path, node) # TODO: less dumb thing would be to have wildcard expander just be an enumerator # and then call it on each access ..each do | slashpath | guts[slashpath] = .fetch_val_by_slashpath(slashpath) end end |
Instance Attribute Details
#guts ⇒ Object
Returns the value of attribute guts.
11 12 13 |
# File 'lib/chef-attribute-validator/attribute_set.rb', line 11 def guts @guts end |
#node ⇒ Object
Returns the value of attribute node.
13 14 15 |
# File 'lib/chef-attribute-validator/attribute_set.rb', line 13 def node @node end |
#path ⇒ Object
Returns the value of attribute path.
12 13 14 |
# File 'lib/chef-attribute-validator/attribute_set.rb', line 12 def path @path end |