Class: Bulldog::Processor::ArgumentTree::Node
- Inherits:
-
Object
- Object
- Bulldog::Processor::ArgumentTree::Node
- Defined in:
- lib/bulldog/processor/argument_tree.rb
Instance Attribute Summary collapse
-
#arguments ⇒ Object
readonly
Returns the value of attribute arguments.
-
#callback ⇒ Object
readonly
Returns the value of attribute callback.
-
#children ⇒ Object
readonly
Returns the value of attribute children.
-
#outputs ⇒ Object
Returns the value of attribute outputs.
-
#styles ⇒ Object
readonly
Returns the value of attribute styles.
Instance Method Summary collapse
- #add_child(child) ⇒ Object
-
#initialize(styles, arguments = [], &callback) ⇒ Node
constructor
A new instance of Node.
- #remove_child(child) ⇒ Object
Constructor Details
#initialize(styles, arguments = [], &callback) ⇒ Node
Returns a new instance of Node.
95 96 97 98 99 100 101 |
# File 'lib/bulldog/processor/argument_tree.rb', line 95 def initialize(styles, arguments=[], &callback) @styles = styles @arguments = arguments @callback = callback @outputs = [] @children = [] end |
Instance Attribute Details
#arguments ⇒ Object (readonly)
Returns the value of attribute arguments.
112 113 114 |
# File 'lib/bulldog/processor/argument_tree.rb', line 112 def arguments @arguments end |
#callback ⇒ Object (readonly)
Returns the value of attribute callback.
112 113 114 |
# File 'lib/bulldog/processor/argument_tree.rb', line 112 def callback @callback end |
#children ⇒ Object (readonly)
Returns the value of attribute children.
112 113 114 |
# File 'lib/bulldog/processor/argument_tree.rb', line 112 def children @children end |
#outputs ⇒ Object
Returns the value of attribute outputs.
111 112 113 |
# File 'lib/bulldog/processor/argument_tree.rb', line 111 def outputs @outputs end |
#styles ⇒ Object (readonly)
Returns the value of attribute styles.
112 113 114 |
# File 'lib/bulldog/processor/argument_tree.rb', line 112 def styles @styles end |
Instance Method Details
#add_child(child) ⇒ Object
103 104 105 |
# File 'lib/bulldog/processor/argument_tree.rb', line 103 def add_child(child) children << child end |
#remove_child(child) ⇒ Object
107 108 109 |
# File 'lib/bulldog/processor/argument_tree.rb', line 107 def remove_child(child) children.delete(child) end |