Class: Johnson::Visitors::EnumeratingVisitor

Inherits:
Visitor
  • Object
show all
Defined in:
lib/johnson/visitors/enumerating_visitor.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Visitor

#accept, #visit_For, #visit_ForIn, #visit_Function, #visit_LexicalScope, #visit_SourceElements, #visit_Try

Constructor Details

#initialize(block) ⇒ EnumeratingVisitor

Returns a new instance of EnumeratingVisitor.



5
6
7
# File 'lib/johnson/visitors/enumerating_visitor.rb', line 5

def initialize(block)
  @block = block
end

Instance Attribute Details

#blockObject

Returns the value of attribute block.



4
5
6
# File 'lib/johnson/visitors/enumerating_visitor.rb', line 4

def block
  @block
end