Class: Kaisoku::Commands::MapCommand

Inherits:
Object
  • Object
show all
Defined in:
lib/kaisoku/commands/map_command.rb

Instance Method Summary collapse

Constructor Details

#initialize(argv, options) ⇒ MapCommand

Returns a new instance of MapCommand.



8
9
10
11
12
# File 'lib/kaisoku/commands/map_command.rb', line 8

def initialize(argv, options)
  @argv = argv
  @context = RuntimeContext.new(options)
  @options = options
end

Instance Method Details

#callObject



14
15
16
17
18
19
20
21
22
23
# File 'lib/kaisoku/commands/map_command.rb', line 14

def call
  subcommand = @argv.shift
  return build if subcommand == 'build'
  return export if subcommand == 'export'
  return import if subcommand == 'import'
  return hot if subcommand == 'hot'

  warn 'usage: kaisoku map build|export|import|hot [--adapter NAME] [--map PATH]'
  1
end