Class: Stimul8::Storage::InMemory
- Inherits:
-
Object
- Object
- Stimul8::Storage::InMemory
- Includes:
- Stimul8::Storage
- Defined in:
- lib/stimul8/storage/in_memory.rb
Instance Method Summary collapse
-
#initialize ⇒ InMemory
constructor
A new instance of InMemory.
- #read(component_id, property_name) ⇒ Object
- #write(component_id, property_name, value) ⇒ Object
Methods included from Stimul8::Storage
Constructor Details
#initialize ⇒ InMemory
Returns a new instance of InMemory.
6 7 8 |
# File 'lib/stimul8/storage/in_memory.rb', line 6 def initialize @components = {} end |
Instance Method Details
#read(component_id, property_name) ⇒ Object
14 15 16 |
# File 'lib/stimul8/storage/in_memory.rb', line 14 def read component_id, property_name @components[key_for(component_id, property_name)] end |
#write(component_id, property_name, value) ⇒ Object
10 11 12 |
# File 'lib/stimul8/storage/in_memory.rb', line 10 def write component_id, property_name, value @components[key_for(component_id, property_name)] = value end |