Class: Wrapt::LayoutContext
- Inherits:
-
Object
- Object
- Wrapt::LayoutContext
- Includes:
- Tilt::CompileSite, Helpers
- Defined in:
- lib/wrapt/layout_context.rb
Overview
The context used within the layouts Anything that is required to be avaible in the view context should be included into the Helpers module, or the LayoutContext
Instance Attribute Summary collapse
-
#env ⇒ Object
readonly
Returns the value of attribute env.
Instance Method Summary collapse
-
#initialize(env) ⇒ LayoutContext
constructor
A new instance of LayoutContext.
- #request ⇒ Object
Constructor Details
#initialize(env) ⇒ LayoutContext
Returns a new instance of LayoutContext.
10 11 12 |
# File 'lib/wrapt/layout_context.rb', line 10 def initialize(env) @env = env end |
Instance Attribute Details
#env ⇒ Object (readonly)
Returns the value of attribute env.
6 7 8 |
# File 'lib/wrapt/layout_context.rb', line 6 def env @env end |
Instance Method Details
#request ⇒ Object
14 15 16 |
# File 'lib/wrapt/layout_context.rb', line 14 def request @request = Rack::Request.new(env) end |