Class: MonkeyLens::Formatter::JSON
- Inherits:
-
Object
- Object
- MonkeyLens::Formatter::JSON
- Defined in:
- lib/monkey_lens/formatter/json.rb
Instance Method Summary collapse
-
#initialize(result) ⇒ JSON
constructor
A new instance of JSON.
- #render ⇒ Object
Constructor Details
#initialize(result) ⇒ JSON
Returns a new instance of JSON.
8 9 10 |
# File 'lib/monkey_lens/formatter/json.rb', line 8 def initialize(result) @result = result end |
Instance Method Details
#render ⇒ Object
12 13 14 |
# File 'lib/monkey_lens/formatter/json.rb', line 12 def render ::JSON.pretty_generate(@result.to_h) end |