class SugarCane::JsonFormatter

Computes a machine-readable JSON representation from an array of violations computed by the checks.

Public Class Methods

new(violations, options = {}) click to toggle source
# File lib/sugarcane/json_formatter.rb, line 8
def initialize(violations, options = {})
  @violations = violations
end

Public Instance Methods

to_s() click to toggle source
# File lib/sugarcane/json_formatter.rb, line 12
def to_s
  @violations.to_json
end