Class: Morpheus::Client::CachedRequestFormatter
- Inherits:
-
RequestFormatter
- Object
- RequestFormatter
- Morpheus::Client::CachedRequestFormatter
- Defined in:
- lib/morpheus/client/cached_request_formatter.rb
Constant Summary
Constants inherited from RequestFormatter
RequestFormatter::CYAN, RequestFormatter::GREEN, RequestFormatter::MAGENTA, RequestFormatter::RED, RequestFormatter::YELLOW
Instance Attribute Summary
Attributes inherited from RequestFormatter
Instance Method Summary collapse
Methods inherited from RequestFormatter
call, #color, #formatted_payload, #initialize, #odd?, #payload, #request_color
Constructor Details
This class inherits a constructor from Morpheus::Client::RequestFormatter
Instance Method Details
#call ⇒ Object
5 6 7 |
# File 'lib/morpheus/client/cached_request_formatter.rb', line 5 def call "#{request_statement} #{payload}" end |
#duration ⇒ Object
14 15 16 |
# File 'lib/morpheus/client/cached_request_formatter.rb', line 14 def duration event.duration end |
#request_statement ⇒ Object
9 10 11 12 |
# File 'lib/morpheus/client/cached_request_formatter.rb', line 9 def request_statement statement = "CACHE (#{duration}ms)" color(statement, request_color, true) end |