Class: TelegramOnSteroids::InMemoryStore
- Inherits:
-
Object
- Object
- TelegramOnSteroids::InMemoryStore
- Defined in:
- lib/telegram_on_steroids/in_memory_store.rb
Instance Method Summary collapse
-
#initialize ⇒ InMemoryStore
constructor
A new instance of InMemoryStore.
- #read(key) ⇒ Object
- #write(key, value) ⇒ Object
Constructor Details
#initialize ⇒ InMemoryStore
Returns a new instance of InMemoryStore.
2 3 4 |
# File 'lib/telegram_on_steroids/in_memory_store.rb', line 2 def initialize @store = {} end |
Instance Method Details
#read(key) ⇒ Object
6 7 8 |
# File 'lib/telegram_on_steroids/in_memory_store.rb', line 6 def read(key) @store[key] end |
#write(key, value) ⇒ Object
10 11 12 |
# File 'lib/telegram_on_steroids/in_memory_store.rb', line 10 def write(key, value) @store[key] = value end |