Sha256: e582a89ca0b4146679b9af7b369d411756cb9901ab3865dc1749edaf63b22240

Contents?: true

Size: 424 Bytes

Versions: 10

Compression:

Stored size: 424 Bytes

Contents

module Gateway
  module Requests

    #
    # Common request
    # All request is needed to inheritance from it
    #
    class CommonRequest

      #
      # Convert instance variables to hash
      #
      # @return [Hash]
      #
      def attributes
        hash = {}
        instance_variables.each do |attr|
          hash[attr[1..-1]] = instance_variable_get attr
        end
        hash
      end

    end
  end
end

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
gateway-sdk-1.0.3 lib/gateway/requests/common_request.rb
gateway-sdk-1.0.2 lib/gateway/requests/common_request.rb
gateway-sdk-1.0.1 lib/gateway/requests/common_request.rb
gateway-sdk-1.0.0 lib/gateway/requests/common_request.rb
gateway-sdk-0.2.4 lib/gateway/requests/common_request.rb
gateway-sdk-0.2.3 lib/gateway/requests/common_request.rb
gateway-sdk-0.2.2 lib/gateway/requests/common_request.rb
gateway-sdk-0.2.1 lib/gateway/requests/common_request.rb
gateway-sdk-0.2.0 lib/gateway/requests/common_request.rb
gateway_sdk-0.2.0 lib/gateway/requests/common_request.rb