Module: Octo::Config::ClassMethods

Defined in:
lib/octocore-cassandra/config.rb

Instance Method Summary collapse

Instance Method Details

#curr_configObject



27
28
29
30
# File 'lib/octocore-cassandra/config.rb', line 27

def curr_config
  @config = Hash.new({}) unless @config
  @config
end

#get_config(key, default = nil) ⇒ Object



23
24
25
# File 'lib/octocore-cassandra/config.rb', line 23

def get_config(key, default = nil)
  curr_config.fetch(key, default)
end

#load_config(opts) ⇒ Object



15
16
17
# File 'lib/octocore-cassandra/config.rb', line 15

def load_config(opts)
  curr_config.merge!opts
end

#set_config(key, val) ⇒ Object



19
20
21
# File 'lib/octocore-cassandra/config.rb', line 19

def set_config(key, val)
  curr_config[key] = val
end