Module: RequireProfiler::Plugins::RailsPlugin::ToPreparePatch

Defined in:
lib/require_profiler/plugins/rails_plugin.rb

Instance Method Summary collapse

Instance Method Details

#to_prepare(*args, &block) ⇒ Object



14
15
16
17
18
19
20
21
22
# File 'lib/require_profiler/plugins/rails_plugin.rb', line 14

def to_prepare(*args, &block)
  return super unless block

  super do |*prepare_args|
    RailsPlugin.track(:to_prepare, nil, block) do
      instance_exec(*prepare_args, &block)
    end
  end
end