module Tr3llo::View::Card::ListMine

Public Instance Methods

render(cards) click to toggle source
# File lib/3llo/view/card/list_mine.rb, line 7
def render(cards)
  if cards.any?
    cards
      .map { |card| render_card(card) }
      .join("\n")
  else
    "You are currently assigned to no cards"
  end
end

Private Instance Methods

render_card(card) click to toggle source
# File lib/3llo/view/card/list_mine.rb, line 19
def render_card(card)
  "#{Utils.format_key_tag(card.id, card.shortcut)} (#{Utils.paint(card.list.name, "purple")}) #{card.name}"
end