Module: Roy::Before
- Defined in:
- lib/roy/before.rb
Overview
This module allows you to modify the environment before it is handled by the application. It does this by overriding the #call method.
Configuration:
- roy.conf.before
-
A proc object that will be called with the environment as argument. Defaults to identity if not set.
Instance Method Summary collapse
Instance Method Details
#call(env) ⇒ Object
32 33 34 35 |
# File 'lib/roy/before.rb', line 32 def call(env) (roy.conf.before || lambda {|x| x }).(env) super end |