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.
8 9 10 11 |
# File 'lib/hashira/report/json.rb', line 8 def initialize(view, io: $stdout) @view = view @io = io end |
Instance Method Details
#print ⇒ Object
13 14 15 16 |
# File 'lib/hashira/report/json.rb', line 13 def print @io.puts JSON.pretty_generate(payload) 0 end |