Class: Cuba::Tools::Widget::Responder
- Defined in:
- lib/cuba/tools/widget/responder.rb
Instance Method Summary collapse
-
#initialize(app, env) ⇒ Responder
constructor
A new instance of Responder.
- #respond ⇒ Object
Constructor Details
#initialize(app, env) ⇒ Responder
Returns a new instance of Responder.
4 5 6 7 |
# File 'lib/cuba/tools/widget/responder.rb', line 4 def initialize(app, env) @app = app @env = env end |
Instance Method Details
#respond ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/cuba/tools/widget/responder.rb', line 9 def respond if , , events = Widget.load_all @app, req, res events.trigger , , req.params # res.write "$('head > meta[name=csrf-token]').attr('content', '#{csrf_token}');" res.write '$(document).trigger("page:change");' end res.finish end |