From 805b500bc1e12a8f6680737bef81ae34492c9187 Mon Sep 17 00:00:00 2001 From: David Vazgenovich Shakaryan Date: Mon, 21 Apr 2014 08:52:53 -0700 Subject: Remove extraneous level of data nesting. --- core/config.rb | 11 +++-------- 1 file 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 -- cgit v1.2.3-70-g09d2