Class: CallLogger::Formatter
- Inherits:
-
Object
- Object
- CallLogger::Formatter
- Defined in:
- lib/call_logger/formatter.rb
Instance Method Summary collapse
- #after(method, result, seconds: nil) ⇒ Object
- #before(method, args) ⇒ Object
- #error(method, exception) ⇒ Object
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 |