Class: ActiveService::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/active_service/configuration.rb

Constant Summary collapse

CONFIG_FILE =
"config/active_service.yml"
DEFAULTS =
{'path' => 'app/services'}

Class Method Summary collapse

Class Method Details

.confObject



14
15
16
17
# File 'lib/active_service/configuration.rb', line 14

def conf
  return DEFAULTS unless File.exist?(CONFIG_FILE)
  File.open(CONFIG_FILE) { |file| YAML.load(file) }
end

.pathObject



8
9
10
# File 'lib/active_service/configuration.rb', line 8

def path
  conf['path']
end