Class: Hashira::Report::Json
- Inherits:
-
Object
- Object
- Hashira::Report::Json
- Defined in:
- lib/hashira/report/json.rb
Instance Method Summary collapse
-
#initialize(view, io: $stdout) ⇒ Json
constructor
A new instance of Json.
- #print ⇒ Object
Constructor Details
#initialize(view, io: $stdout) ⇒ Json
Returns a new instance of Json.
6 7 8 9 |
# File 'lib/hashira/report/json.rb', line 6 def initialize(view, io: $stdout) @view = view @io = io end |
Instance Method Details
#print ⇒ Object
11 12 13 14 |
# File 'lib/hashira/report/json.rb', line 11 def print @io.puts(JSON.pretty_generate(payload)) 0 end |