Class: MemoRack::BaseLocals

Inherits:
Locals
  • Object
show all
Defined in:
lib/memorack/locals/base.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Locals

#[], #context, #context=, define_key, #define_key, #has_key?, #merge, #super_has_key?, #value, value_method, #value_method?

Constructor Details

#initialize(app, hash = nil, ifnone = nil) ⇒ BaseLocals

Returns a new instance of BaseLocals.



13
14
15
16
17
18
19
20
# File 'lib/memorack/locals/base.rb', line 13

def initialize(app, hash = nil, ifnone = nil)
	super ifnone

	@app = app
	merge!(hash) if hash

	self[:app] = AppLocals[]
end

Instance Attribute Details

#appObject (readonly)

Returns the value of attribute app.



11
12
13
# File 'lib/memorack/locals/base.rb', line 11

def app
  @app
end