Class: SimplePerf::Config
- Inherits:
-
Object
- Object
- SimplePerf::Config
- Defined in:
- lib/simple_perf/config.rb
Instance Attribute Summary collapse
-
#config ⇒ Object
Returns the value of attribute config.
Instance Method Summary collapse
- #environment(name) ⇒ Object
- #environments ⇒ Object
-
#initialize(args = {}) ⇒ Config
constructor
A new instance of Config.
- #notifications ⇒ Object
- #region(name) ⇒ Object
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
#config ⇒ Object
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 |
#environments ⇒ Object
10 11 12 |
# File 'lib/simple_perf/config.rb', line 10 def environments config['environments'] end |
#notifications ⇒ Object
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 |