Module: Inflect::Responsive
- Included in:
- AbstractService
- Defined in:
- lib/inflect/responsive.rb
Overview
Allows services to respond an Inflect::Response instance.
Instance Method Summary collapse
-
#respond(content, options = {}) ⇒ Inflect::Response?
Method that creates Response instance.
-
#respond!(content, options = {}) ⇒ Inflect::Response
Method that creates Response instance, skipping response validation.
Instance Method Details
#respond(content, options = {}) ⇒ Inflect::Response?
Method that creates Response instance.
10 11 12 13 |
# File 'lib/inflect/responsive.rb', line 10 def respond(content, = {}) opts = () validate_response(Inflect::Response.new(content, opts)) end |
#respond!(content, options = {}) ⇒ Inflect::Response
Method that creates Response instance, skipping response validation.
18 19 20 21 |
# File 'lib/inflect/responsive.rb', line 18 def respond!(content, = {}) opts = () Inflect::Response.new(content, opts) end |