Class: Pansophy::ConfigPath

Inherits:
Object
  • Object
show all
Defined in:
lib/pansophy/config_synchronizer.rb

Class Method Summary collapse

Class Method Details

.find!Object



45
46
47
48
49
50
51
# File 'lib/pansophy/config_synchronizer.rb', line 45

def self.find!
  # TODO: Extract this in a Rails specific gem
  return Rails.root.join('config') if defined?(Rails)
  return sinatra_root_pathname.join('config') if defined?(Sinatra::Application)

  fail ConfigSynchronizerError, 'Could not determine location of config folder'
end