class YourMembership::Error

Custom exception for YourMembership error codes. @attr [Integer] error_code The Error Code @attr [String] error_description A Description of what the error means.

Attributes

error_code[RW]
error_description[RW]

Public Class Methods

new(error_code, error_description) click to toggle source

@param [Integer] error_code The Error Code @param [String] error_description A Description of what the error means. @see api.yourmembership.com/reference/2_00/Error_Codes.htm

# File lib/your_membership/error.rb, line 11
def initialize(error_code, error_description)
  self.error_code = error_code
  self.error_description = error_description
end

Public Instance Methods

to_s() click to toggle source

@return [String] A highly readable error message.

# File lib/your_membership/error.rb, line 17
def to_s
  "Your Membership Returned An Error Code: #{error_code} With Message: #{error_description}"
end