Module: Thredded::DatabaseSeeder::LogTime::ClassMethods

Defined in:
lib/thredded/database_seeder.rb

Instance Method Summary collapse

Instance Method Details

#log_method_time(method_name) ⇒ Object



33
34
35
36
37
38
39
40
# File 'lib/thredded/database_seeder.rb', line 33

def log_method_time(method_name)
  prepend(Module.new do
    define_method method_name do |*args, **kwargs|
      log_time { super(*args, **kwargs) }
    end
  end)
  method_name
end