Class: YARD::CodeObjects::Chef::AttributeObject
- Inherits:
-
ChefObject
- Object
- NamespaceObject
- ChefObject
- YARD::CodeObjects::Chef::AttributeObject
- Defined in:
- lib/yard-chefdoc/code_objects/attribute.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
Returns the value of attribute attributes.
Attributes inherited from ChefObject
Instance Method Summary collapse
-
#add(h) ⇒ Object
Add a single attribute as an Attribute object (see below).
-
#initialize(namespace, name) ⇒ AttributeObject
constructor
Creates a new instance of the AttributeObject which represents a file in the attributes directory.
Methods inherited from ChefObject
#chef_init, #children_by_type, #find_description_in, #find_header_in, register, register_element
Constructor Details
#initialize(namespace, name) ⇒ AttributeObject
Creates a new instance of the AttributeObject which represents a file in the attributes directory.
17 18 19 20 |
# File 'lib/yard-chefdoc/code_objects/attribute.rb', line 17 def initialize(namespace, name) super(namespace, name) @attributes = [] end |
Instance Attribute Details
#attributes ⇒ Object
Returns the value of attribute attributes.
7 8 9 |
# File 'lib/yard-chefdoc/code_objects/attribute.rb', line 7 def attributes @attributes end |
Instance Method Details
#add(h) ⇒ Object
Add a single attribute as an Attribute object (see below)
26 27 28 |
# File 'lib/yard-chefdoc/code_objects/attribute.rb', line 26 def add(h) @attributes.push(Attribute.new(h)) end |