Sha256: f7c75b7fb6b5837070b196aabc6543505acdb81d415247370c51b1b372c31151

Contents?: true

Size: 497 Bytes

Versions: 3

Compression:

Stored size: 497 Bytes

Contents

module Troo
  class CardPresenter
    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
      print Template.parse(decorated_card, "/../views/card.erb")
    end

    private
    attr_reader :card

    def decorated_card
      @decorated_card ||= CardDecorator.new(card)
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
troo-0.0.4 lib/troo/display/card_presenter.rb
troo-0.0.3 lib/troo/display/card_presenter.rb
troo-0.0.2 lib/troo/display/card_presenter.rb