Sha256: 1ba3af3eb24bcc238ff5790f92449db244517654c2ea90400b2596d16b6a501a

Contents?: true

Size: 740 Bytes

Versions: 7

Compression:

Stored size: 740 Bytes

Contents

# frozen_string_literal: true
module CloudParty

  module Response
    def self.included(base)
      base.include CloudParty::Responses::ResponseMethods
      base.attr_reader :body, :parsed_response, :code, :errors, :messages, :results, :result
    end

    def filter_by_account(account)
      # blah
    end
    # @param [Result] result_json_object check result type for parsing
    # @raise [UnRecognizedResultTypeError] when the result type is neither Hash nor Array
    def check_result_type(result_json_object)
      if result_json_object.is_a?(Hash)
        'Hash'
      elsif result_json_object.is_a?(Array)
        'Array'
      else
        raise UnRecognizedResultTypeError, result_json_object.class
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
cloud_party-0.1.7 lib/cloud_party/response.rb
cloud_party-0.1.6 lib/cloud_party/response.rb
cloud_party-0.1.5 lib/cloud_party/response.rb
cloud_party-0.1.4 lib/cloud_party/response.rb
cloud_party-0.1.3 lib/cloud_party/response.rb
cloud_party-0.1.2 lib/cloud_party/response.rb
cloud_party-0.1.1 lib/cloud_party/response.rb