Class: Wrapt::LayoutContext

Inherits:
Object
  • Object
show all
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

See Also:

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#envObject (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

#requestObject



14
15
16
# File 'lib/wrapt/layout_context.rb', line 14

def request
  @request = Rack::Request.new(env)
end