lib/pilfer/profiler.rb in pilfer-0.0.1.pre4 vs lib/pilfer/profiler.rb in pilfer-1.0.0

- old
+ new

@@ -6,20 +6,22 @@ def initialize(reporter) @reporter = reporter end - def profile(profiler = method(:lineprof), start = Time.now, &app) - profile_files_matching(/./, profiler, start, &app) + def profile(*args, &app) + profile_files_matching(/./, *args, &app) end - def profile_files_matching(matcher, profiler = method(:lineprof), + def profile_files_matching(matcher, description = nil, + reporter_options = {}, + profiler = method(:lineprof), start = Time.now, &app) app_response = nil profile = profiler.call(matcher) do app_response = app.call end - reporter.write profile, start + reporter.write profile, start, description, reporter_options app_response end end end