Exception: Viki::Error
- Inherits:
-
StandardError
- Object
- StandardError
- Viki::Error
- Defined in:
- lib/viki/error.rb
Instance Attribute Summary collapse
-
#message ⇒ Object
Returns the value of attribute message.
-
#status ⇒ Object
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(status, msg = nil) ⇒ Error
constructor
A new instance of Error.
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. = msg super(msg||"#{self.status}: #{self.}") end |
Instance Attribute Details
#message ⇒ Object
Returns the value of attribute message.
3 4 5 |
# File 'lib/viki/error.rb', line 3 def @message end |
#status ⇒ Object
Returns the value of attribute status.
3 4 5 |
# File 'lib/viki/error.rb', line 3 def status @status end |