Class: SlonikMigration::Command
- Inherits:
-
Object
- Object
- SlonikMigration::Command
- Defined in:
- lib/slonik_migration/command.rb
Instance Method Summary collapse
- #execute(sql, options = {}) ⇒ Object
-
#initialize ⇒ Command
constructor
A new instance of Command.
Constructor Details
#initialize ⇒ Command
Returns a new instance of Command.
8 9 10 |
# File 'lib/slonik_migration/command.rb', line 8 def initialize @config = SlonikMigration::Config.load end |
Instance Method Details
#execute(sql, options = {}) ⇒ Object
12 13 14 15 16 |
# File 'lib/slonik_migration/command.rb', line 12 def execute(sql, = {}) command = build(sql, **) puts command if ENV['VERBOSE'] system command end |