Class: Issuu::IssuuExceptionManager
- Inherits:
-
Object
- Object
- Issuu::IssuuExceptionManager
- Defined in:
- lib/issuu/issuu_exception_manager.rb
Instance Method Summary collapse
-
#initialize(params) ⇒ IssuuExceptionManager
constructor
A new instance of IssuuExceptionManager.
- #raise_error ⇒ Object
Constructor Details
#initialize(params) ⇒ IssuuExceptionManager
Returns a new instance of IssuuExceptionManager.
3 4 5 6 7 8 9 |
# File 'lib/issuu/issuu_exception_manager.rb', line 3 def initialize(params) @message = "##{params["code"]} #{params["message"]}" case params["code"] when "200","201" then @message << ": '#{params["field"]}'" end end |
Instance Method Details
#raise_error ⇒ Object
11 12 13 |
# File 'lib/issuu/issuu_exception_manager.rb', line 11 def raise_error raise IssuuException, @message end |