Class: MetzScan::Calibration::RubydexDriftFormatter
- Inherits:
-
Object
- Object
- MetzScan::Calibration::RubydexDriftFormatter
- Defined in:
- lib/metz_scan/calibration/rubydex_drift_formatter.rb
Instance Method Summary collapse
-
#initialize(summary, analyzers:) ⇒ RubydexDriftFormatter
constructor
A new instance of RubydexDriftFormatter.
- #json ⇒ Object
- #text ⇒ Object
Constructor Details
#initialize(summary, analyzers:) ⇒ RubydexDriftFormatter
Returns a new instance of RubydexDriftFormatter.
8 9 10 11 |
# File 'lib/metz_scan/calibration/rubydex_drift_formatter.rb', line 8 def initialize(summary, analyzers:) @summary = summary @analyzers = analyzers end |
Instance Method Details
#json ⇒ Object
13 14 15 |
# File 'lib/metz_scan/calibration/rubydex_drift_formatter.rb', line 13 def json JSON.pretty_generate(payload) end |
#text ⇒ Object
17 18 19 |
# File 'lib/metz_scan/calibration/rubydex_drift_formatter.rb', line 17 def text [header_lines, rule_lines, breakdown_lines].flatten.compact.join("\n") end |