Class: Commands::Start

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

Constant Summary collapse

COMMAND_MAP =
Map.new.merge({
  "bug"     => Commands::Bug,
  "chore"   => Commands::Chore,
  "feature" => Commands::Feature,
  /^\d+$/   => Commands::Card
})

Class Method Summary collapse

Class Method Details

.for(*args) ⇒ Object



17
18
19
20
21
# File 'lib/commands/start.rb', line 17

def for(*args)
  identifier = args.shift
  construct_instance_for(identifier, args) || 
    raise(ArgumentError, "Unknown card identifier given: #{identifier}")
end