Class: CheckPlease::Printers::JSON
- Defined in:
- lib/check_please/printers/json.rb
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from CheckPlease::Printers::Base
Instance Method Details
#to_s ⇒ Object
5 6 7 8 9 10 11 12 13 |
# File 'lib/check_please/printers/json.rb', line 5 def to_s return "[]" if diffs.empty? build_string do |io| io.puts "[" io.puts diffs.map { |diff| diff_json(diff) }.join(",\n") io.puts "]" end end |