Exception: ApiHammer::Halt
- Defined in:
- lib/api_hammer/halt.rb
Overview
an exception raised to stop processing an action and render the body given as the 'body' argument (which is expected to be a JSON-able object)
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#render_options ⇒ Object
readonly
Returns the value of attribute render_options.
Instance Method Summary collapse
-
#initialize(message, body, render_options = {}) ⇒ Halt
constructor
A new instance of Halt.
Constructor Details
#initialize(message, body, render_options = {}) ⇒ Halt
Returns a new instance of Halt.
11 12 13 14 15 |
# File 'lib/api_hammer/halt.rb', line 11 def initialize(, body, ={}) super() @body = body @render_options = end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
17 18 19 |
# File 'lib/api_hammer/halt.rb', line 17 def body @body end |
#render_options ⇒ Object (readonly)
Returns the value of attribute render_options.
17 18 19 |
# File 'lib/api_hammer/halt.rb', line 17 def @render_options end |