Module: Tr3llo::View::Card::Comments

Extended by:
Comments
Included in:
Comments
Defined in:
lib/3llo/view/card/comments.rb

Instance Method Summary collapse

Instance Method Details

#render(comments) ⇒ Object



7
8
9
10
11
12
13
14
15
# File 'lib/3llo/view/card/comments.rb', line 7

def render(comments)
  if comments.any?
    comments
      .map { |comment| render_comment(comment) }
      .join("\n\n")
  else
    "No comments on this card yet. Use #{Utils.format_highlight("card comment")} to write the first comment."
  end
end