Class: Adjust::Core::Configuration

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

Instance Method Summary collapse

Instance Method Details

#activeObject



20
21
22
# File 'lib/adjust/core/configuration.rb', line 20

def active
  configurations[environment]
end

#active_environmentObject



24
25
26
# File 'lib/adjust/core/configuration.rb', line 24

def active_environment
  active['environment']
end

#configurationsObject



16
17
18
# File 'lib/adjust/core/configuration.rb', line 16

def configurations
  @configurations ||= read_configurations
end

#environmentObject



12
13
14
# File 'lib/adjust/core/configuration.rb', line 12

def environment
  @environment ||= default_environment
end

#load(path, environment: nil) ⇒ Object



7
8
9
10
# File 'lib/adjust/core/configuration.rb', line 7

def load(path, environment: nil)
  @environment = environment || default_environment
  @configurations = read_configurations path
end

#tokens(app, event) ⇒ Object



28
29
30
# File 'lib/adjust/core/configuration.rb', line 28

def tokens(app, event)
  Tokens.new(app, event, active).find
end