Exception: Viki::Error

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(status, msg = nil) ⇒ Error

Returns a new instance of Error.



5
6
7
8
9
# File 'lib/viki/error.rb', line 5

def initialize(status, msg=nil)
  self.status = status
  self.message = msg
  super(msg||"#{self.status}: #{self.message}")
end

Instance Attribute Details

#messageObject

Returns the value of attribute message.



3
4
5
# File 'lib/viki/error.rb', line 3

def message
  @message
end

#statusObject

Returns the value of attribute status.



3
4
5
# File 'lib/viki/error.rb', line 3

def status
  @status
end