Class: SqlMigrate::Config
- Inherits:
-
Object
- Object
- SqlMigrate::Config
- Defined in:
- lib/sql_migrate/config.rb
Constant Summary collapse
- VALID_OPTIONS =
[ :host, :port, :database, :user, :password, :migration_paths, :logger, :dryrun, :verbose, :applied, ].freeze
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
A new instance of Config.
- #merge(params) ⇒ Object
- #reset ⇒ Object
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
18 19 20 |
# File 'lib/sql_migrate/config.rb', line 18 def initialize reset end |
Instance Method Details
#merge(params) ⇒ Object
22 23 24 25 26 27 |
# File 'lib/sql_migrate/config.rb', line 22 def merge(params) params.each do |key, value| self.send("#{key}=", value) end self end |
#reset ⇒ Object
29 30 31 32 33 34 35 36 37 38 |
# File 'lib/sql_migrate/config.rb', line 29 def reset self.host = "localhost" self.port = 3306 self.user = "root" self.migration_paths = ["migrations"] self.logger = default_logger self.dryrun = false self.verbose = false self.applied = false end |