Sha256: 8681a4edf3aefed9e062c42c5acb08050ff446728407d581ae1b8c1b7e60f2f6

Contents?: true

Size: 416 Bytes

Versions: 40

Compression:

Stored size: 416 Bytes

Contents

begin
  require 'json'
rescue LoadError
  raise <<-ERR
The json gem must be installed for json output.
To install it:
$ [sudo] gem install json -v"~>1.4.6"
  ERR
end

module Timetrap
  module Formatters
    class Json
      attr_accessor :output

      def initialize entries
        @output = entries.map do |e|
          next unless e.end
          e.values
        end.compact.to_json
      end
    end
  end
end

Version data entries

40 entries across 40 versions & 1 rubygems

Version Path
timetrap-1.15.2 lib/timetrap/formatters/json.rb
timetrap-1.15.1 lib/timetrap/formatters/json.rb
timetrap-1.14.3 lib/timetrap/formatters/json.rb
timetrap-1.15.0 lib/timetrap/formatters/json.rb
timetrap-1.14.2 lib/timetrap/formatters/json.rb
timetrap-1.14.1 lib/timetrap/formatters/json.rb
timetrap-1.14.0 lib/timetrap/formatters/json.rb
timetrap-1.13.0 lib/timetrap/formatters/json.rb
timetrap-1.12.0 lib/timetrap/formatters/json.rb
timetrap-1.11.0 lib/timetrap/formatters/json.rb
timetrap-1.10.0 lib/timetrap/formatters/json.rb
timetrap-1.9.0 lib/timetrap/formatters/json.rb
timetrap-1.8.14 lib/timetrap/formatters/json.rb
timetrap-1.8.13 lib/timetrap/formatters/json.rb
timetrap-1.8.12 lib/timetrap/formatters/json.rb
timetrap-1.8.11 lib/timetrap/formatters/json.rb
timetrap-1.8.10 lib/timetrap/formatters/json.rb
timetrap-1.8.9 lib/timetrap/formatters/json.rb
timetrap-1.8.8 lib/timetrap/formatters/json.rb
timetrap-1.8.7 lib/timetrap/formatters/json.rb