Class: Leftovers::DefinitionNodeSet
- Inherits:
-
Object
- Object
- Leftovers::DefinitionNodeSet
- Defined in:
- lib/leftovers/definition_node_set.rb
Instance Attribute Summary collapse
-
#definitions ⇒ Object
readonly
Returns the value of attribute definitions.
Instance Method Summary collapse
- #add_definition_node(definition_node) ⇒ Object
- #add_definition_set(definition_node_set) ⇒ Object
-
#initialize ⇒ DefinitionNodeSet
constructor
A new instance of DefinitionNodeSet.
Constructor Details
#initialize ⇒ DefinitionNodeSet
Returns a new instance of DefinitionNodeSet.
7 8 9 |
# File 'lib/leftovers/definition_node_set.rb', line 7 def initialize @definitions = [] end |
Instance Attribute Details
#definitions ⇒ Object (readonly)
Returns the value of attribute definitions.
5 6 7 |
# File 'lib/leftovers/definition_node_set.rb', line 5 def definitions @definitions end |
Instance Method Details
#add_definition_node(definition_node) ⇒ Object
11 12 13 |
# File 'lib/leftovers/definition_node_set.rb', line 11 def add_definition_node(definition_node) @definitions << definition_node end |
#add_definition_set(definition_node_set) ⇒ Object
15 16 17 |
# File 'lib/leftovers/definition_node_set.rb', line 15 def add_definition_set(definition_node_set) @definitions.concat(definition_node_set.definitions) end |