Class: GameMachine::DataStore

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Includes:
Singleton
Defined in:
lib/game_machine/data_store.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeDataStore

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

#storeObject (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