Module: RShare::Configuration
Instance Method Summary collapse
Instance Method Details
#load(filename) ⇒ Object
7 8 9 10 11 12 13 14 |
# File 'lib/rshare/conf.rb', line 7 def load(filename) conf = File.open(filename, "rt") { |f| JSON.load(f.read()) } # Expand local paths had_trailing_slash = conf['local'][-1].eql?('/') conf['local'] = File.(conf['local']) + (had_trailing_slash ? '/' : '') conf end |