Sha256: 315a4a560b2edee80ea6e0c307a908c843f8ce3baeb0e371620fa0b827e77b09

Contents?: true

Size: 434 Bytes

Versions: 1

Compression:

Stored size: 434 Bytes

Contents

module Fukuzatsu

  module Formatters

    class JsonIndex

      include Formatters::Base

      attr_reader :summaries

      def initialize(summaries)
        @summaries = summaries
      end

      def content
        summaries.map { |summary| Json.new(summary: summary).as_json }.to_json
      end

      def filename
        "json/results.json"
      end

      def file_extension
        ".json"
      end

    end

  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
fukuzatsu-2.1.1 lib/fukuzatsu/formatters/json_index.rb