Class: CheckPlease::Printers::JSON

Inherits:
Base
  • Object
show all
Defined in:
lib/check_please/printers/json.rb

Instance Method Summary collapse

Methods inherited from Base

#initialize, render

Constructor Details

This class inherits a constructor from CheckPlease::Printers::Base

Instance Method Details

#to_sObject



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