Class: ActualDbSchema::Configuration
- Inherits:
-
Object
- Object
- ActualDbSchema::Configuration
- Defined in:
- lib/actual_db_schema/configuration.rb
Overview
Manages the configuration settings for the gem.
Instance Attribute Summary collapse
-
#auto_rollback_disabled ⇒ Object
Returns the value of attribute auto_rollback_disabled.
-
#console_migrations_enabled ⇒ Object
Returns the value of attribute console_migrations_enabled.
-
#enabled ⇒ Object
Returns the value of attribute enabled.
-
#excluded_databases ⇒ Object
Returns the value of attribute excluded_databases.
-
#git_hooks_enabled ⇒ Object
Returns the value of attribute git_hooks_enabled.
-
#migrated_folder ⇒ Object
Returns the value of attribute migrated_folder.
-
#migrations_storage ⇒ Object
Returns the value of attribute migrations_storage.
-
#multi_tenant_schemas ⇒ Object
Returns the value of attribute multi_tenant_schemas.
-
#ui_enabled ⇒ Object
Returns the value of attribute ui_enabled.
Instance Method Summary collapse
- #[](key) ⇒ Object
- #[]=(key, value) ⇒ Object
- #fetch(key, default = nil) ⇒ Object
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
9 10 11 |
# File 'lib/actual_db_schema/configuration.rb', line 9 def initialize apply_defaults(default_settings) end |
Instance Attribute Details
#auto_rollback_disabled ⇒ Object
Returns the value of attribute auto_rollback_disabled.
6 7 8 |
# File 'lib/actual_db_schema/configuration.rb', line 6 def auto_rollback_disabled @auto_rollback_disabled end |
#console_migrations_enabled ⇒ Object
Returns the value of attribute console_migrations_enabled.
6 7 8 |
# File 'lib/actual_db_schema/configuration.rb', line 6 def console_migrations_enabled @console_migrations_enabled end |
#enabled ⇒ Object
Returns the value of attribute enabled.
6 7 8 |
# File 'lib/actual_db_schema/configuration.rb', line 6 def enabled @enabled end |
#excluded_databases ⇒ Object
Returns the value of attribute excluded_databases.
6 7 8 |
# File 'lib/actual_db_schema/configuration.rb', line 6 def excluded_databases @excluded_databases end |
#git_hooks_enabled ⇒ Object
Returns the value of attribute git_hooks_enabled.
6 7 8 |
# File 'lib/actual_db_schema/configuration.rb', line 6 def git_hooks_enabled @git_hooks_enabled end |
#migrated_folder ⇒ Object
Returns the value of attribute migrated_folder.
6 7 8 |
# File 'lib/actual_db_schema/configuration.rb', line 6 def migrated_folder @migrated_folder end |
#migrations_storage ⇒ Object
Returns the value of attribute migrations_storage.
6 7 8 |
# File 'lib/actual_db_schema/configuration.rb', line 6 def migrations_storage @migrations_storage end |
#multi_tenant_schemas ⇒ Object
Returns the value of attribute multi_tenant_schemas.
6 7 8 |
# File 'lib/actual_db_schema/configuration.rb', line 6 def multi_tenant_schemas @multi_tenant_schemas end |
#ui_enabled ⇒ Object
Returns the value of attribute ui_enabled.
6 7 8 |
# File 'lib/actual_db_schema/configuration.rb', line 6 def ui_enabled @ui_enabled end |
Instance Method Details
#[](key) ⇒ Object
13 14 15 |
# File 'lib/actual_db_schema/configuration.rb', line 13 def [](key) public_send(key) end |
#[]=(key, value) ⇒ Object
17 18 19 20 21 22 |
# File 'lib/actual_db_schema/configuration.rb', line 17 def []=(key, value) public_send("#{key}=", value) return unless key.to_sym == :migrations_storage && defined?(ActualDbSchema::Store) ActualDbSchema::Store.instance.reset_adapter end |
#fetch(key, default = nil) ⇒ Object
24 25 26 27 28 29 30 |
# File 'lib/actual_db_schema/configuration.rb', line 24 def fetch(key, default = nil) if respond_to?(key) public_send(key) else default end end |