Class: RubyProf::CallInfoVisitor

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby-prof/call_info_visitor.rb

Instance Method Summary collapse

Constructor Details

#initialize(call_infos) ⇒ CallInfoVisitor

Returns a new instance of CallInfoVisitor.



20
21
22
# File 'lib/ruby-prof/call_info_visitor.rb', line 20

def initialize(call_infos)
  @call_infos = CallInfo.roots_of(call_infos)
end

Instance Method Details

#visit(&block) ⇒ Object



24
25
26
27
28
# File 'lib/ruby-prof/call_info_visitor.rb', line 24

def visit(&block)
  @call_infos.each do |call_info|
    visit_call_info(call_info, &block)
  end
end