Exception: Itunes::Receipt::Error

Inherits:
StandardError
  • Object
show all
Defined in:
lib/itunes/receipt/error.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(code) ⇒ Error

Returns a new instance of Error.



7
8
9
# File 'lib/itunes/receipt/error.rb', line 7

def initialize code
   @status = code
end

Instance Attribute Details

#statusObject (readonly)

Returns the value of attribute status.



5
6
7
# File 'lib/itunes/receipt/error.rb', line 5

def status
  @status
end

Class Method Details

.new(code) ⇒ Object



11
12
13
14
15
16
# File 'lib/itunes/receipt/error.rb', line 11

def self.new code
   return super if self != Itunes::Receipt::Error

   type = Itunes::Receipt::ERRORS[code]
   type.is_a?(NilClass) && super || type.new(code)
end