Class: Bulldog::Processor::ArgumentTree::Node

Inherits:
Object
  • Object
show all
Defined in:
lib/bulldog/processor/argument_tree.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#argumentsObject (readonly)

Returns the value of attribute arguments.



112
113
114
# File 'lib/bulldog/processor/argument_tree.rb', line 112

def arguments
  @arguments
end

#callbackObject (readonly)

Returns the value of attribute callback.



112
113
114
# File 'lib/bulldog/processor/argument_tree.rb', line 112

def callback
  @callback
end

#childrenObject (readonly)

Returns the value of attribute children.



112
113
114
# File 'lib/bulldog/processor/argument_tree.rb', line 112

def children
  @children
end

#outputsObject

Returns the value of attribute outputs.



111
112
113
# File 'lib/bulldog/processor/argument_tree.rb', line 111

def outputs
  @outputs
end

#stylesObject (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