Class: FastExt::Ctx
- Inherits:
-
Object
- Object
- FastExt::Ctx
- Defined in:
- app/models/fast_ext/ctx.rb
Instance Method Summary collapse
- #get(key) ⇒ Object
-
#initialize ⇒ Ctx
constructor
A new instance of Ctx.
- #set(key, value) ⇒ Object
Constructor Details
#initialize ⇒ Ctx
Returns a new instance of Ctx.
3 4 5 |
# File 'app/models/fast_ext/ctx.rb', line 3 def initialize @data = {} end |
Instance Method Details
#get(key) ⇒ Object
11 12 13 |
# File 'app/models/fast_ext/ctx.rb', line 11 def get(key) @data[key.to_s] end |
#set(key, value) ⇒ Object
7 8 9 |
# File 'app/models/fast_ext/ctx.rb', line 7 def set(key,value) @data[key.to_s] = value end |