Sha256: e3048607045caad65e5a933a46d113cdbf8a0c09a5e024ddddd2d44ec9b2e8b7
Contents?: true
Size: 680 Bytes
Versions: 3
Compression:
Stored size: 680 Bytes
Contents
module Troo class CommentPresenter class << self def render_show(card, options = {}) new(card, options).render_show end end include DecoratorHelpers def initialize(card, options = {}) @card = card @options = options end def render_show spacing do print CardDecorator.new(card).short if card.comments.any? card.comments.each do |comment| indent do print CommentDecorator.new(comment).as_view end end else print_error "No comments were found." end end end private attr_reader :card end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
troo-0.0.4 | lib/troo/display/comment_presenter.rb |
troo-0.0.3 | lib/troo/display/comment_presenter.rb |
troo-0.0.2 | lib/troo/display/comment_presenter.rb |