Class: GammaReplication::DatabaseSettings
- Inherits:
-
Object
- Object
- GammaReplication::DatabaseSettings
- Defined in:
- lib/gamma_replication/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
- #in_database_config ⇒ Object
-
#initialize(yaml_path) ⇒ DatabaseSettings
constructor
A new instance of DatabaseSettings.
- #out_database_config ⇒ Object
Constructor Details
#initialize(yaml_path) ⇒ DatabaseSettings
Returns a new instance of DatabaseSettings.
7 8 9 10 11 12 |
# File 'lib/gamma_replication/database_settings.rb', line 7 def initialize(yaml_path) @settings = YAML.safe_load_file(yaml_path, permitted_classes: [Symbol, Hash], symbolize_names: true).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.
5 6 7 |
# File 'lib/gamma_replication/database_settings.rb', line 5 def in_database @in_database end |
#out_database ⇒ Object (readonly)
Returns the value of attribute out_database.
5 6 7 |
# File 'lib/gamma_replication/database_settings.rb', line 5 def out_database @out_database end |
#settings ⇒ Object (readonly)
Returns the value of attribute settings.
5 6 7 |
# File 'lib/gamma_replication/database_settings.rb', line 5 def settings @settings end |
Instance Method Details
#in_database_config ⇒ Object
14 15 16 |
# File 'lib/gamma_replication/database_settings.rb', line 14 def in_database_config @in_database end |
#out_database_config ⇒ Object
18 19 20 |
# File 'lib/gamma_replication/database_settings.rb', line 18 def out_database_config @out_database end |