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.
6 7 8 |
# File 'lib/slonik_migration/command.rb', line 6 def initialize @config = SlonikMigration::Config.load end |
Instance Method Details
#execute(sql, options = {}) ⇒ Object
10 11 12 13 14 |
# File 'lib/slonik_migration/command.rb', line 10 def execute(sql, = {}) command = build(sql, ) puts command if ENV['VERBOSE'] system command end |