Class: YARD::CodeObjects::Chef::ResourceObject
- Inherits:
-
ChefObject
- Object
- NamespaceObject
- ChefObject
- YARD::CodeObjects::Chef::ResourceObject
- Defined in:
- lib/yard-chefdoc/code_objects/resource.rb
Instance Attribute Summary collapse
-
#actions ⇒ Object
Returns the value of attribute actions.
-
#default_action ⇒ Object
Returns the value of attribute default_action.
-
#load_current_value ⇒ Object
Returns the value of attribute load_current_value.
-
#properties ⇒ Object
Returns the value of attribute properties.
-
#resource_name ⇒ Object
Returns the value of attribute resource_name.
Attributes inherited from ChefObject
Instance Method Summary collapse
-
#add_action(h) ⇒ Object
Add an action as an Action object (see below).
-
#add_property(h) ⇒ Object
Add a single property as an Property object (see below).
-
#initialize(namespace, name) ⇒ ResourceObject
constructor
Creates a new instance of the ResourceObject.
Methods inherited from ChefObject
#chef_init, #children_by_type, #find_description_in, #find_header_in, register, register_element
Constructor Details
#initialize(namespace, name) ⇒ ResourceObject
Creates a new instance of the ResourceObject
21 22 23 24 25 26 |
# File 'lib/yard-chefdoc/code_objects/resource.rb', line 21 def initialize(namespace, name) super(namespace, name) @resource_name = name @properties = [] @actions = [] end |
Instance Attribute Details
#actions ⇒ Object
Returns the value of attribute actions.
7 8 9 |
# File 'lib/yard-chefdoc/code_objects/resource.rb', line 7 def actions @actions end |
#default_action ⇒ Object
Returns the value of attribute default_action.
7 8 9 |
# File 'lib/yard-chefdoc/code_objects/resource.rb', line 7 def default_action @default_action end |
#load_current_value ⇒ Object
Returns the value of attribute load_current_value.
7 8 9 |
# File 'lib/yard-chefdoc/code_objects/resource.rb', line 7 def load_current_value @load_current_value end |
#properties ⇒ Object
Returns the value of attribute properties.
7 8 9 |
# File 'lib/yard-chefdoc/code_objects/resource.rb', line 7 def properties @properties end |
#resource_name ⇒ Object
Returns the value of attribute resource_name.
7 8 9 |
# File 'lib/yard-chefdoc/code_objects/resource.rb', line 7 def resource_name @resource_name end |
Instance Method Details
#add_action(h) ⇒ Object
Add an action as an Action object (see below)
40 41 42 |
# File 'lib/yard-chefdoc/code_objects/resource.rb', line 40 def add_action(h) @actions.push(Action.new(h)) end |
#add_property(h) ⇒ Object
Add a single property as an Property object (see below)
32 33 34 |
# File 'lib/yard-chefdoc/code_objects/resource.rb', line 32 def add_property(h) @properties.push(Property.new(h)) end |