Class: DbSchema::Configuration
- Inherits:
-
Object
- Object
- DbSchema::Configuration
- Defined in:
- lib/db_schema/configuration.rb
Instance Attribute Summary collapse
-
#adapter ⇒ Object
readonly
Returns the value of attribute adapter.
-
#database ⇒ Object
readonly
Returns the value of attribute database.
-
#host ⇒ Object
readonly
Returns the value of attribute host.
-
#password ⇒ Object
readonly
Returns the value of attribute password.
-
#port ⇒ Object
readonly
Returns the value of attribute port.
-
#user ⇒ Object
readonly
Returns the value of attribute user.
Instance Method Summary collapse
- #dry_run? ⇒ Boolean
-
#initialize(adapter: 'postgres', host: 'localhost', port: 5432, database:, user: nil, password: '', log_changes: true, dry_run: false, post_check: true) ⇒ Configuration
constructor
A new instance of Configuration.
- #log_changes? ⇒ Boolean
- #post_check_enabled? ⇒ Boolean
Constructor Details
#initialize(adapter: 'postgres', host: 'localhost', port: 5432, database:, user: nil, password: '', log_changes: true, dry_run: false, post_check: true) ⇒ Configuration
Returns a new instance of Configuration.
5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/db_schema/configuration.rb', line 5 def initialize(adapter: 'postgres', host: 'localhost', port: 5432, database:, user: nil, password: '', log_changes: true, dry_run: false, post_check: true) @adapter = adapter @host = host @port = port @database = database @user = user @password = password @log_changes = log_changes @dry_run = dry_run @post_check = post_check end |
Instance Attribute Details
#adapter ⇒ Object (readonly)
Returns the value of attribute adapter.
3 4 5 |
# File 'lib/db_schema/configuration.rb', line 3 def adapter @adapter end |
#database ⇒ Object (readonly)
Returns the value of attribute database.
3 4 5 |
# File 'lib/db_schema/configuration.rb', line 3 def database @database end |
#host ⇒ Object (readonly)
Returns the value of attribute host.
3 4 5 |
# File 'lib/db_schema/configuration.rb', line 3 def host @host end |
#password ⇒ Object (readonly)
Returns the value of attribute password.
3 4 5 |
# File 'lib/db_schema/configuration.rb', line 3 def password @password end |
#port ⇒ Object (readonly)
Returns the value of attribute port.
3 4 5 |
# File 'lib/db_schema/configuration.rb', line 3 def port @port end |
#user ⇒ Object (readonly)
Returns the value of attribute user.
3 4 5 |
# File 'lib/db_schema/configuration.rb', line 3 def user @user end |
Instance Method Details
#dry_run? ⇒ Boolean
21 22 23 |
# File 'lib/db_schema/configuration.rb', line 21 def dry_run? @dry_run end |
#log_changes? ⇒ Boolean
17 18 19 |
# File 'lib/db_schema/configuration.rb', line 17 def log_changes? @log_changes end |
#post_check_enabled? ⇒ Boolean
25 26 27 |
# File 'lib/db_schema/configuration.rb', line 25 def post_check_enabled? @post_check end |