Class: Mulder::Formats::JSON
- Inherits:
-
Base
- Object
- Base
- Mulder::Formats::JSON
show all
- Defined in:
- lib/mulder/formats/json.rb
Instance Attribute Summary collapse
Attributes inherited from Base
#instances
Instance Method Summary
collapse
Methods inherited from Base
#initialize
Instance Attribute Details
#stream ⇒ Object
8
9
10
|
# File 'lib/mulder/formats/json.rb', line 8
def stream
@stream || STDOUT
end
|
Instance Method Details
#output ⇒ Object
12
13
14
|
# File 'lib/mulder/formats/json.rb', line 12
def output
stream.write(instances.collect(&:as_hash).to_json)
end
|