Sha256: b88aa57b7390f1ea313e3ca32254ba21d7bd03f3fd1fbdb66e61713620344424

Contents?: true

Size: 287 Bytes

Versions: 6

Compression:

Stored size: 287 Bytes

Contents

module Nineteen
  module Eighty
    module Two
      module Formats
        class JSON
          def self.format text
            {
              id: text.to_s.gsub('"', ''),
              data: Spectrum[*text]
            }.to_json
          end
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
nineteen-eighty-two-0.1.9 lib/nineteen/eighty/two/formatters/json_formatter.rb
nineteen-eighty-two-0.1.8 lib/nineteen/eighty/two/formatters/json_formatter.rb
nineteen-eighty-two-0.1.7 lib/nineteen/eighty/two/formatters/json_formatter.rb
nineteen-eighty-two-0.1.6 lib/nineteen/eighty/two/formatters/json_formatter.rb
nineteen-eighty-two-0.1.5 lib/nineteen/eighty/two/formatters/json_formatter.rb
nineteen-eighty-two-0.1.4 lib/nineteen/eighty/two/formatters/json_formatter.rb