Class: GameMachine::DataStore
- Inherits:
-
Object
- Object
- GameMachine::DataStore
- Extended by:
- Forwardable
- Includes:
- Singleton
- Defined in:
- lib/game_machine/data_store.rb
Instance Attribute Summary collapse
-
#store ⇒ Object
readonly
Returns the value of attribute store.
Instance Method Summary collapse
-
#initialize ⇒ DataStore
constructor
A new instance of DataStore.
- #set_store(store_name) ⇒ Object
Constructor Details
#initialize ⇒ DataStore
Returns a new instance of DataStore.
15 16 17 18 |
# File 'lib/game_machine/data_store.rb', line 15 def initialize @store_name = Application.config.data_store connect end |
Instance Attribute Details
#store ⇒ Object (readonly)
Returns the value of attribute store.
14 15 16 |
# File 'lib/game_machine/data_store.rb', line 14 def store @store end |
Instance Method Details
#set_store(store_name) ⇒ Object
20 21 22 23 24 |
# File 'lib/game_machine/data_store.rb', line 20 def set_store(store_name) @store = nil @store_name = store_name connect end |