diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/config.rb | 8 | ||||
-rw-r--r-- | core/store.rb | 8 |
2 files changed, 16 insertions, 0 deletions
diff --git a/core/config.rb b/core/config.rb index 466e435..36511ed 100644 --- a/core/config.rb +++ b/core/config.rb @@ -20,6 +20,14 @@ module Dinobot end end + def [](key) + @data[key] + end + + def []=(key, value) + @data[key] = value + end + def save @store.save end diff --git a/core/store.rb b/core/store.rb index ba49733..5e1cf67 100644 --- a/core/store.rb +++ b/core/store.rb @@ -14,6 +14,14 @@ module Dinobot @data ||= Hash.new end + def [](key) + @data[key] + end + + def []=(key, value) + @data[key] = value + end + def read @store.transaction(true) do @data = @store[:data] |