Class: PassStation::Output::Json
- Inherits:
-
Object
- Object
- PassStation::Output::Json
- Defined in:
- lib/pass_station/output.rb
Overview
JSON formatter
Class Method Summary collapse
-
.format(table) ⇒ Array<String>
Format the
Array<CSV::Row>
into JSON.
Class Method Details
.format(table) ⇒ Array<String>
Format the Array<CSV::Row>
into JSON
223 224 225 |
# File 'lib/pass_station/output.rb', line 223 def format(table) [table.map(&:to_h).to_json] end |