Class: PageEz::Visitors::DepthVisitor

Inherits:
Object
  • Object
show all
Defined in:
lib/page_ez/visitors/depth_visitor.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeDepthVisitor

Returns a new instance of DepthVisitor.



6
7
8
# File 'lib/page_ez/visitors/depth_visitor.rb', line 6

def initialize
  reset
end

Instance Attribute Details

#depthObject (readonly)

Returns the value of attribute depth.



4
5
6
# File 'lib/page_ez/visitors/depth_visitor.rb', line 4

def depth
  @depth
end

Instance Method Details

#begin_block_evaluationObject



10
11
12
# File 'lib/page_ez/visitors/depth_visitor.rb', line 10

def begin_block_evaluation
  @depth += 1
end

#define_method(name) ⇒ Object



18
19
# File 'lib/page_ez/visitors/depth_visitor.rb', line 18

def define_method(name)
end

#end_block_evaluationObject



14
15
16
# File 'lib/page_ez/visitors/depth_visitor.rb', line 14

def end_block_evaluation
  @depth -= 1
end

#inherit_from(subclass) ⇒ Object



21
22
# File 'lib/page_ez/visitors/depth_visitor.rb', line 21

def inherit_from(subclass)
end

#process_macroObject



36
37
# File 'lib/page_ez/visitors/depth_visitor.rb', line 36

def process_macro(*)
end

#resetObject



39
40
41
# File 'lib/page_ez/visitors/depth_visitor.rb', line 39

def reset
  @depth = 0
end

#track_method_addedObject



24
25
# File 'lib/page_ez/visitors/depth_visitor.rb', line 24

def track_method_added(*)
end

#track_method_delegatedObject



33
34
# File 'lib/page_ez/visitors/depth_visitor.rb', line 33

def track_method_delegated(*)
end

#track_method_renamedObject



30
31
# File 'lib/page_ez/visitors/depth_visitor.rb', line 30

def track_method_renamed(*)
end

#track_method_undefinedObject



27
28
# File 'lib/page_ez/visitors/depth_visitor.rb', line 27

def track_method_undefined(*)
end