Sha256: eb47cfffb98926ee141a21de773a9b6d809ad2c4365fbdc9b14a2f60bec7cd5f

Contents?: true

Size: 525 Bytes

Versions: 1

Compression:

Stored size: 525 Bytes

Contents

module Troo
  module Presenters
    class Card
      include DecoratorHelpers

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

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

      def show
        print Template.parse(decorated_card, '/../views/card.erb')
      end

      private

      attr_reader :card

      def decorated_card
        @decorated_card ||= card.decorator
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

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