Class: MemoRack::BaseLocals
- Defined in:
- lib/memorack/locals/base.rb
Instance Attribute Summary collapse
-
#app ⇒ Object
readonly
Returns the value of attribute app.
Instance Method Summary collapse
-
#initialize(app, hash = nil, ifnone = nil) ⇒ BaseLocals
constructor
A new instance of BaseLocals.
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
#app ⇒ Object (readonly)
Returns the value of attribute app.
11 12 13 |
# File 'lib/memorack/locals/base.rb', line 11 def app @app end |