Sha256: 993cbef1009504f5000714b5809303fd3015c21f39f97ff3abe87f9715418e7b

Contents?: true

Size: 432 Bytes

Versions: 41

Compression:

Stored size: 432 Bytes

Contents

# -*- encoding : utf-8 -*-

class Card
  class Format
    class JsonFormat < DataFormat
      register :json

      def mime_type
        "text/json"
      end

      def expand_stubs content
        case content
        when Hash
          content.each { |k, v| content[k] = expand_stubs v }
        when Array
          content.map { |item| expand_stubs item }
        else
          super
        end
      end
    end
  end
end

Version data entries

41 entries across 41 versions & 2 rubygems

Version Path
card-mod-format-0.18.1 lib/card/format/json_format.rb
card-mod-format-0.18.0 lib/card/format/json_format.rb
card-mod-format-0.17.0 lib/card/format/json_format.rb
card-mod-format-0.16.0 lib/card/format/json_format.rb
card-mod-format-0.15.6 lib/card/format/json_format.rb
card-mod-format-0.15.5 lib/card/format/json_format.rb
card-mod-format-0.15.4 lib/card/format/json_format.rb
card-mod-format-0.15.3 lib/card/format/json_format.rb
card-mod-format-0.15.2.pre1 lib/card/format/json_format.rb
card-mod-format-0.15.1.1 lib/card/format/json_format.rb
card-mod-format-0.15.1 lib/card/format/json_format.rb
card-mod-format-0.15.0 lib/card/format/json_format.rb
card-mod-format-0.14.2 lib/card/format/json_format.rb
card-mod-format-0.14.1 lib/card/format/json_format.rb
card-mod-format-0.14.0 lib/card/format/json_format.rb
card-mod-format-0.13.4 lib/card/format/json_format.rb
card-mod-format-0.13.3 lib/card/format/json_format.rb
card-mod-format-0.13.2 lib/card/format/json_format.rb
card-mod-format-0.13.1 lib/card/format/json_format.rb
card-mod-format-0.13.0 lib/card/format/json_format.rb