Class: Gamma::DatabaseSettings
- Inherits:
-
Object
- Object
- Gamma::DatabaseSettings
- Defined in:
- lib/gamma/database_settings.rb
Instance Attribute Summary collapse
-
#in_database ⇒ Object
readonly
Returns the value of attribute in_database.
-
#out_database ⇒ Object
readonly
Returns the value of attribute out_database.
-
#settings ⇒ Object
readonly
Returns the value of attribute settings.
Instance Method Summary collapse
-
#initialize(yaml_path) ⇒ DatabaseSettings
constructor
A new instance of DatabaseSettings.
Constructor Details
#initialize(yaml_path) ⇒ DatabaseSettings
4 5 6 7 8 |
# File 'lib/gamma/database_settings.rb', line 4 def initialize(yaml_path) @settings = YAML.load_file(yaml_path).with_indifferent_access @in_database = @settings[:in_database_config] @out_database = @settings[:out_database_config] end |
Instance Attribute Details
#in_database ⇒ Object (readonly)
Returns the value of attribute in_database.
2 3 4 |
# File 'lib/gamma/database_settings.rb', line 2 def in_database @in_database end |
#out_database ⇒ Object (readonly)
Returns the value of attribute out_database.
2 3 4 |
# File 'lib/gamma/database_settings.rb', line 2 def out_database @out_database end |
#settings ⇒ Object (readonly)
Returns the value of attribute settings.
2 3 4 |
# File 'lib/gamma/database_settings.rb', line 2 def settings @settings end |