aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2014-04-21 08:52:53 -0700
committerDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2014-04-21 08:52:53 -0700
commit805b500bc1e12a8f6680737bef81ae34492c9187 (patch)
tree68737c07b6f3c2e257e2b73a87c0153559a99335 /core
parentfbff2860e9ba2e11794ec627db224d92b16a8c4d (diff)
downloaddinobot-805b500bc1e12a8f6680737bef81ae34492c9187.tar.gz
dinobot-805b500bc1e12a8f6680737bef81ae34492c9187.tar.xz
Remove extraneous level of data nesting.
Diffstat (limited to 'core')
-rw-r--r--core/config.rb11
1 files changed, 3 insertions, 8 deletions
diff --git a/core/config.rb b/core/config.rb
index 242f030..466e435 100644
--- a/core/config.rb
+++ b/core/config.rb
@@ -10,22 +10,17 @@ module Dinobot
def initialize
@store = Dinobot::Core::Store.new('config')
- @data = @store.data[:data]
-
- if @data.nil?
- @data = Hash.new
+ @data = @store.data
+ if @data.empty?
@data[:debug] = false
-
- @data[:trigger] = Hash.new
- @data[:trigger][:global] = '!'
+ @data[:trigger] = {global: '!'}
save
end
end
def save
- @store.data[:data] = @data
@store.save
end