Class: TransformTree::Root
Instance Attribute Summary collapse
-
#height ⇒ Object
readonly
Returns the value of attribute height.
Instance Method Summary collapse
- #add_transform(*closures) ⇒ Object (also: #add_transforms)
- #execute(*args) ⇒ Object
-
#initialize ⇒ Root
constructor
A new instance of Root.
- #report ⇒ Object
Constructor Details
#initialize ⇒ Root
Returns a new instance of Root.
4 5 6 7 |
# File 'lib/transform_tree/root.rb', line 4 def initialize super(TransformTree::Transforms.null, 0) @height = 0 end |
Instance Attribute Details
#height ⇒ Object (readonly)
Returns the value of attribute height.
3 4 5 |
# File 'lib/transform_tree/root.rb', line 3 def height @height end |
Instance Method Details
#add_transform(*closures) ⇒ Object Also known as: add_transforms
9 10 11 12 |
# File 'lib/transform_tree/root.rb', line 9 def add_transform(*closures) @height += 1 super(*closures) end |
#execute(*args) ⇒ Object
18 19 20 21 |
# File 'lib/transform_tree/root.rb', line 18 def execute(*args) args = [nil] if args.empty? super(*args) end |
#report ⇒ Object
14 15 16 |
# File 'lib/transform_tree/root.rb', line 14 def report super end |