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

Inherits:
Visitor
  • Object
show all
Defined in:
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.



123
124
125
# File 'lib/action_dispatch/journey/visitors.rb', line 123

def initialize(block)
  @block = block
end

Instance Attribute Details

#blockObject (readonly)

:nodoc:



121
122
123
# File 'lib/action_dispatch/journey/visitors.rb', line 121

def block
  @block
end

Instance Method Details

#visit(node) ⇒ Object



127
128
129
130
# File 'lib/action_dispatch/journey/visitors.rb', line 127

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