Class: RubyRabbitmqJanus::Tools::Env
- Inherits:
-
Object
- Object
- RubyRabbitmqJanus::Tools::Env
- Includes:
- Singleton
- Defined in:
- lib/rrj/tools/env.rb
Overview
Class for tools used in gem :reek:UtilityFunction
Instance Method Summary collapse
-
#test_env_var(configuration, key) ⇒ Object
Test if a string contains a word ENV.
Instance Method Details
#test_env_var(configuration, key) ⇒ Object
Test if a string contains a word ENV
12 13 14 15 16 17 18 19 |
# File 'lib/rrj/tools/env.rb', line 12 def test_env_var(configuration, key) test = configuration[key.to_s] if test.is_a?(String) test.include?('ENV') ? ENV[test.gsub("ENV['", '').gsub("']", '')] : test else test end end |