Class: SimplePerf::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/simple_perf/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args = {}) ⇒ Config

Returns a new instance of Config.



6
7
8
# File 'lib/simple_perf/config.rb', line 6

def initialize(args = {})
  load_config_file
end

Instance Attribute Details

#configObject

Returns the value of attribute config.



4
5
6
# File 'lib/simple_perf/config.rb', line 4

def config
  @config
end

Instance Method Details

#environment(name) ⇒ Object



14
15
16
17
# File 'lib/simple_perf/config.rb', line 14

def environment(name)
  raise "Environment not found" unless environments.include? name
  environments[name]
end

#environmentsObject



10
11
12
# File 'lib/simple_perf/config.rb', line 10

def environments
  config['environments']
end

#notificationsObject



19
20
21
# File 'lib/simple_perf/config.rb', line 19

def notifications
  config['notifications']
end

#region(name) ⇒ Object



23
24
25
# File 'lib/simple_perf/config.rb', line 23

def region(name)
  environment(name)['region']
end