Class: ActionDispatch::Journey::Visitors::Each

Inherits:
Visitor show all
Defined in:
actionpack/lib/action_dispatch/journey/visitors.rb

Overview

Loop through the requirements AST

Constant Summary

Constants inherited from Visitor

Visitor::DISPATCH_CACHE

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Visitor

#accept

Constructor Details

#initialize(block) ⇒ Each

Returns a new instance of Each.



50
51
52
# File 'actionpack/lib/action_dispatch/journey/visitors.rb', line 50

def initialize(block)
  @block = block
end

Instance Attribute Details

#blockObject (readonly)

:nodoc:



48
49
50
# File 'actionpack/lib/action_dispatch/journey/visitors.rb', line 48

def block
  @block
end

Instance Method Details

#visit(node) ⇒ Object



54
55
56
57
# File 'actionpack/lib/action_dispatch/journey/visitors.rb', line 54

def visit(node)
  super
  block.call(node)
end