Class: TrueandcoAnalytics::Database::GetCurrentConfig
- Inherits:
-
Object
- Object
- TrueandcoAnalytics::Database::GetCurrentConfig
- Defined in:
- lib/trueandco_analytics/console/commands/database/get_current_config.rb
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(current_mode, path) ⇒ GetCurrentConfig
constructor
A new instance of GetCurrentConfig.
Constructor Details
#initialize(current_mode, path) ⇒ GetCurrentConfig
Returns a new instance of GetCurrentConfig.
4 5 6 7 |
# File 'lib/trueandco_analytics/console/commands/database/get_current_config.rb', line 4 def initialize(current_mode, path) @current_mode = current_mode @path = path end |
Instance Method Details
#execute ⇒ Object
9 10 11 12 13 14 |
# File 'lib/trueandco_analytics/console/commands/database/get_current_config.rb', line 9 def execute config = YAML.load_file(path) config[current_mode] rescue StandardError => e return nil end |