Class: CallLogger::Formatter

Inherits:
Object
  • Object
show all
Defined in:
lib/call_logger/formatter.rb

Instance Method Summary collapse

Instance Method Details

#after(method, result, seconds: nil) ⇒ Object



7
8
9
# File 'lib/call_logger/formatter.rb', line 7

def after(method, result, seconds: nil)
  "#{method} => #{result}, [Took: #{'%.6f' % seconds}s]"
end

#before(method, args) ⇒ Object



3
4
5
# File 'lib/call_logger/formatter.rb', line 3

def before(method, args)
  "#{method}(#{args.join(', ')})"
end

#error(method, exception) ⇒ Object



11
12
13
# File 'lib/call_logger/formatter.rb', line 11

def error(method, exception)
  "#{method} !! #{exception}"
end