Sha256: 1af21fc441a73206083b217458885e0850e995ad499463e3ed59f3435757cfe2

Contents?: true

Size: 398 Bytes

Versions: 2

Compression:

Stored size: 398 Bytes

Contents

# frozen_string_literal: true

module Aitch
  module ResponseParser
    module JSONParser
      class << self
        attr_accessor :engine
      end

      self.engine = Engines::JSON

      def self.type
        :json
      end

      def self.match?(content_type)
        content_type =~ /json/
      end

      def self.load(source)
        engine.load(source.to_s)
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
aitch-1.2.0 lib/aitch/response_parser/json_parser.rb
aitch-1.1.0 lib/aitch/response_parser/json_parser.rb