Exception: Oinky::OinkyException

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*a) ⇒ OinkyException

Returns a new instance of OinkyException.



9
10
11
12
13
14
15
16
# File 'lib/oinky/error.rb', line 9

def initialize(*a)
  if a.size > 1
    super(*a[1..-1])
    @code = a[0]
  else
    super(*a)
  end
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



8
9
10
# File 'lib/oinky/error.rb', line 8

def code
  @code
end