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.8.6 lib/timetrap/formatters/json.rb
timetrap-1.8.5 lib/timetrap/formatters/json.rb
timetrap-1.8.4 lib/timetrap/formatters/json.rb
timetrap-1.8.3 lib/timetrap/formatters/json.rb
timetrap-1.8.3.beta2 lib/timetrap/formatters/json.rb
timetrap-1.8.3.beta1 lib/timetrap/formatters/json.rb
timetrap-1.8.2 lib/timetrap/formatters/json.rb
timetrap-1.8.1 lib/timetrap/formatters/json.rb
timetrap-1.8.0 lib/timetrap/formatters/json.rb
timetrap-1.7.10 lib/timetrap/formatters/json.rb
timetrap-1.7.9 lib/timetrap/formatters/json.rb
timetrap-1.7.8 lib/timetrap/formatters/json.rb
timetrap-1.7.7 lib/timetrap/formatters/json.rb
timetrap-1.7.6 lib/timetrap/formatters/json.rb
timetrap-1.7.5 lib/timetrap/formatters/json.rb
timetrap-1.7.4 lib/timetrap/formatters/json.rb
timetrap-1.7.3 lib/timetrap/formatters/json.rb
timetrap-1.7.2 lib/timetrap/formatters/json.rb
timetrap-1.7.1 lib/timetrap/formatters/json.rb
timetrap-1.7.0 lib/timetrap/formatters/json.rb