Class: Ramaze::Dispatcher::Action
- Extended by:
- Trinity
- Defined in:
- lib/ramaze/dispatcher/action.rb
Overview
This dispatcher is responsible for relaying requests to Controller::handle and filtering the results using FILTER.
Constant Summary collapse
- FILTER =
The response is passed to each filter by sending .call(response) to it.
OrderedSet[ # Ramaze::Tool::Localize, ]
Class Method Summary collapse
-
.call(path) ⇒ Object
Takes path, asks Controller to handle it and builds a response on success.
-
.log(path) ⇒ Object
Logs the request via Log#info unless it’s boring.
Methods included from StateAccessor
each, #state_accessor, #state_reader, #state_writer
Class Method Details
.call(path) ⇒ Object
Takes path, asks Controller to handle it and builds a response on success. The response is then passed to each member of FILTER for post-processing.
25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/ramaze/dispatcher/action.rb', line 25 def call(path) log(path) catch(:respond) { response.write Controller.handle(path) } FILTER.each{|f| f.call(response)} response rescue Ramaze::Error => ex ex end |