Sha256: fd45e8bf9daea02e852cf7b88bb47dd6b239b4c6b092835cb6d2b022bc952e5a

Contents?: true

Size: 319 Bytes

Versions: 3

Compression:

Stored size: 319 Bytes

Contents

module JsonApiClient
  module Helpers
    module Parsable
      extend ActiveSupport::Concern

      included do
        class_attribute :parser
        self.parser = Parsers::Parser
      end

      module ClassMethods
        def parse(data)
          parser.parse(self, data)
        end
      end

    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
json_api_client-1.0.0.beta3 lib/json_api_client/helpers/parsable.rb
json_api_client-1.0.0.beta2 lib/json_api_client/helpers/parsable.rb
json_api_client-1.0.0.beta lib/json_api_client/helpers/parsable.rb