Module: Bake::Format::JSON
- Defined in:
- lib/bake/format/json.rb
Constant Summary collapse
- OPTIONS =
{indent: " ", space: " ", space_before: "", object_nl: "\n", array_nl: "\n"}
Class Method Summary collapse
Class Method Details
.input(file) ⇒ Object
11 12 13 |
# File 'lib/bake/format/json.rb', line 11 def self.input(file) ::JSON.load(file) end |
.output(file, value) ⇒ Object
17 18 19 20 |
# File 'lib/bake/format/json.rb', line 17 def self.output(file, value) ::JSON::State.generate(value, OPTIONS, file) file.puts end |