Module: Kuromd::Configurable

Included in:
Journal::File
Defined in:
lib/kuromd/configurable.rb

Instance Method Summary collapse

Instance Method Details

#configure(params = {}) ⇒ Object



18
19
20
21
22
23
24
# File 'lib/kuromd/configurable.rb', line 18

def configure(params = {})
  if @config.nil?
    set_config(Kuromd::Config.new({ config_file: params[:config_file], key: params[:key] }))
  else
    get_config
  end
end

#get_configObject



14
15
16
# File 'lib/kuromd/configurable.rb', line 14

def get_config
  @config
end

#set_config(value) ⇒ Object



10
11
12
# File 'lib/kuromd/configurable.rb', line 10

def set_config(value)
  @config = value
end