Class: TransformTree::Root

Inherits:
Node
  • Object
show all
Defined in:
lib/transform_tree/root.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeRoot

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

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

#reportObject



14
15
16
# File 'lib/transform_tree/root.rb', line 14

def report
  super
end