Sha256: b7073a6f259e94b413cea1150b65fbada2e4f35cb62f3c2202c1eb8f7a88daf8

Contents?: true

Size: 693 Bytes

Versions: 1

Compression:

Stored size: 693 Bytes

Contents

module Troo
  module Presenters
    class List
      include DecoratorHelpers

      class << self
        def show(list, options = {})
          new(list, options).show
        end
      end

      def initialize(list, options = {})
        @list    = list
        @options = options
      end

      def show
        puts board.decorator.title

        title_for(list.decorator)

        print_error 'No cards were found.' if cards.empty?

        cards.each do |card|
          title_for(card)
        end

        puts
      end

      private

      attr_reader :list

      def board
        list.board
      end

      def cards
        list.decorator.cards
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
troo-0.0.8 lib/troo/presenters/list.rb