Module: Utopia::Controller::Respond::ClassMethods
- Defined in:
- lib/utopia/controller/respond.rb
Instance Method Summary collapse
- #respond_to(context, request) ⇒ Object
- #responds ⇒ Object (also: #respond)
- #response_for(context, request, response) ⇒ Object
Instance Method Details
#respond_to(context, request) ⇒ Object
68 69 70 |
# File 'lib/utopia/controller/respond.rb', line 68 def respond_to(context, request) @responder&.respond_to(context, request) end |
#responds ⇒ Object Also known as: respond
62 63 64 |
# File 'lib/utopia/controller/respond.rb', line 62 def responds @responder ||= Responder.new end |
#response_for(context, request, response) ⇒ Object
72 73 74 |
# File 'lib/utopia/controller/respond.rb', line 72 def response_for(context, request, response) @responder&.respond_to(context, request).with(*response[2]) end |