Exception: ApiHammer::Rails::Halt
- Defined in:
- lib/api_hammer/rails/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.
13 14 15 16 17 |
# File 'lib/api_hammer/rails/halt.rb', line 13 def initialize(, body, ={}) super() @body = body @render_options = end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
19 20 21 |
# File 'lib/api_hammer/rails/halt.rb', line 19 def body @body end |
#render_options ⇒ Object (readonly)
Returns the value of attribute render_options.
19 20 21 |
# File 'lib/api_hammer/rails/halt.rb', line 19 def @render_options end |