module Tr3llo::Command::Card::Comment
Public Instance Methods
execute(key)
click to toggle source
# File lib/3llo/command/card/comment.rb, line 7 def execute(key) card_id = Entities.parse_id(:card, key) assert_card_id!(card_id, key) interface = Application.fetch_interface!() interface.print_frame do text = interface.input.multiline("Comment:").join("") API::Card.comment(card_id, text) interface.puts("Comment has been posted") end end
Private Instance Methods
assert_card_id!(card_id, key)
click to toggle source
# File lib/3llo/command/card/comment.rb, line 24 def assert_card_id!(card_id, key) raise InvalidArgumentError.new("#{key.inspect} is not a valid list key") unless card_id end