Class: SlonikMigration::Command

Inherits:
Object
  • Object
show all
Defined in:
lib/slonik_migration/command.rb

Instance Method Summary collapse

Constructor Details

#initializeCommand

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, options = {})
  command = build(sql, **options)
  puts command if ENV['VERBOSE']
  system command
end