Class: Sumcli::Commands::Add::Migration

Inherits:
Sumcli::Command show all
Defined in:
lib/sumcli/commands/add/migration.rb

Instance Method Summary collapse

Methods inherited from Sumcli::Command

#command, #cursor, #editor, #exec_exist?, #generator, #pager, #platform, #prompt, #screen, #which

Constructor Details

#initialize(name, options) ⇒ Migration



9
10
11
12
# File 'lib/sumcli/commands/add/migration.rb', line 9

def initialize(name, options)
  @name = name
  @options = options
end

Instance Method Details

#execute(input: $stdin, output: $stdout) ⇒ Object



14
15
16
# File 'lib/sumcli/commands/add/migration.rb', line 14

def execute(input: $stdin, output: $stdout)
  command.run("rake db:create_migration[#{@name}]")
end