Module: TriggerSwitchD::ConfigFactory
- Defined in:
- lib/trigger_switch_d/config.rb
Defined Under Namespace
Classes: ProperEnvironmentFile
Class Method Summary collapse
-
.new(file = StringIO.new) ⇒ Object
Creates the Config class from the config/config.rb file See samples/config.rb for more documentation.
Class Method Details
.new(file = StringIO.new) ⇒ Object
Creates the Config class from the config/config.rb file See samples/config.rb for more documentation
63 64 65 66 67 68 |
# File 'lib/trigger_switch_d/config.rb', line 63 def self.new(file=StringIO.new) env = file.readlines attributes = map_attributes(env) eval_config_code_definition(attributes) setup_environment(env) end |