lib/3llo/card_command_factory.rb in 3llo-0.1.12 vs lib/3llo/card_command_factory.rb in 3llo-0.2.0
- old
+ new
@@ -6,10 +6,11 @@
require '3llo/commands/card/assign'
require '3llo/commands/card/invalid'
require '3llo/commands/card/comments'
require '3llo/commands/card/comment'
require '3llo/commands/card/add'
+require '3llo/commands/card/archive'
module Tr3llo
class CardCommandFactory
def initialize(subcommand, args)
@subcommand = subcommand
@@ -50,9 +51,12 @@
Command::Card::SelfAssignCommand.new(card_id, user_id)
when 'assign'
card_id, _ = args
board_id = $container.resolve(:board)[:id]
Command::Card::AssignCommand.new(card_id, board_id)
+ when 'archive'
+ card_id, _ = args
+ Command::Card::ArchiveCommand.new(card_id)
else
Command::Card::InvalidCommand.new
end
rescue Container::KeyNotFoundError
Command::ErrorCommand.new