Exception: RestRedmine::Exception
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- RestRedmine::Exception
- Defined in:
- lib/rest_redmine/exception.rb
Instance Attribute Summary collapse
- #message ⇒ Object
-
#response ⇒ Object
Returns the value of attribute response.
Instance Method Summary collapse
-
#initialize(message, response = nil) ⇒ Exception
constructor
A new instance of Exception.
- #to_s ⇒ Object
Constructor Details
#initialize(message, response = nil) ⇒ Exception
Returns a new instance of Exception.
6 7 8 9 |
# File 'lib/rest_redmine/exception.rb', line 6 def initialize , response=nil @message = @response = response if response end |
Instance Attribute Details
#message ⇒ Object
11 12 13 |
# File 'lib/rest_redmine/exception.rb', line 11 def @message || self.class.name end |
#response ⇒ Object
Returns the value of attribute response.
3 4 5 |
# File 'lib/rest_redmine/exception.rb', line 3 def response @response end |
Instance Method Details
#to_s ⇒ Object
15 16 17 |
# File 'lib/rest_redmine/exception.rb', line 15 def to_s "#{self.class}: #{@message}" end |