Class: Bizside::HanaitaConfSub

Inherits:
Object
  • Object
show all
Defined in:
lib/bizside/hanaita_conf.rb

Overview

hanaita_conf をテストするため、 singleton 以前のクラスを定義

TODO: ItamaeConf に移行が済んだ段階でこちらは削除。

Direct Known Subclasses

HanaitaConf

Constant Summary collapse

CONF_FILE =
'/etc/bizside/hanaita.yml'

Instance Method Summary collapse

Constructor Details

#initializeHanaitaConfSub

Returns a new instance of HanaitaConfSub.



11
12
13
14
# File 'lib/bizside/hanaita_conf.rb', line 11

def initialize
  conf_file = ENV['HANAITA_CONF'] || CONF_FILE
  @_conf = YAML.load_file(conf_file) if File.exist?(conf_file)
end

Instance Method Details

#confObject



16
17
18
# File 'lib/bizside/hanaita_conf.rb', line 16

def conf
  @_conf
end