Sha256: 79469f3ae1876c5b06f16a32a49162dbd60e74e7feea4a06a67e613245c13f6f

Contents?: true

Size: 597 Bytes

Versions: 1

Compression:

Stored size: 597 Bytes

Contents

module Troo
  module Commands
    module Status
      class Card < Resource
        private

        def success
          '  Cards:  ' + plural('card') + " found.\n" +
          "          #{resource_title}"
        end

        def error
          if count > 0
            '  Cards:  ' + Esc.red + 'No default card set.' + Esc.reset
          else
            "  Cards:  No cards found.\n"
          end
        end

        def count
          @count ||= Troo::Card.count
        end

        def resource
          @resource ||= Retrieval::Card.default
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
troo-0.0.8 lib/troo/commands/status/card.rb