Class: JOffice::Config
Class Method Summary collapse
Class Method Details
.load(name) ⇒ Object
29 30 31 32 33 34 |
# File 'lib/joffice/config.rb', line 29 def load(name) profiles.each do |host| full_path=File.join(JOFFICE_CONFIG, host, "#{name}.yml") return YAML::load(File.new(full_path)) if File.exists?(full_path) end end |
.profiles ⇒ Object
25 26 27 |
# File 'lib/joffice/config.rb', line 25 def profiles @@profiles||=[[Socket.gethostname,ENV['JOFFICE_ENV']], Socket.gethostname, 'default'] end |