Sha256: 54e722272bc2cfefd9c81efcab65e8cc72feb2bc9ddb6f5e3a14627d9c4ee2a8

Contents?: true

Size: 255 Bytes

Versions: 2

Compression:

Stored size: 255 Bytes

Contents

require 'json'

module Mulder
  module Formats
    class JSON < Base
      attr_writer :stream

      def stream
        @stream || STDOUT
      end

      def output
        stream.write(instances.collect(&:as_hash).to_json)
      end

    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
mulder-0.4.0 lib/mulder/formats/json.rb
mulder-0.3.2 lib/mulder/formats/json.rb