class Temjin::CardCommand::AddCommand
Public Instance Methods
execute()
click to toggle source
# File lib/temjin/card_command/add_command.rb, line 10 def execute # TODO: should also be included in the command setup user = find_user(config.username) list_id = find_list(user, board, list).id create_options = {} create_options[:list_id] = list_id create_options[:name] = card_name if card_name create_options[:desc] = desc if desc new_card = Trello::Card.create(create_options) Formatador.display_line("[[yellow]#{new_card.id}[/]] added") end