Sha256: 2ced91d28130a0e362048e7029f39e470d029077fb23d809254c304bccaa9cef
Contents?: true
Size: 823 Bytes
Versions: 3
Compression:
Stored size: 823 Bytes
Contents
require 'explicit_delegator' require_relative 'content_image' class ContentItemPresenter < ExplicitDelegator include ContentImage enforce_definitions :image, :name, :url def render_time_remaining(&block) yield(source.time_remaining, source.time_total) end def render_popularity(&block) yield(source.popularity) end def render_certification_metadata(&block) yield(source.certification_metadata) if source.certification_metadata.present? end def render_progress_bar(&block) yield(source.percent_complete) if source.percent_complete.present? end def render_completed_on(&block) end def render_elective_points(&block) end def render_essential_duration(&block) end def completed_class 'completed' if source.completed? end def source __getobj__ end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
woople-theme-0.5.12 | app/presenters/content_item_presenter.rb |
woople-theme-0.5.11 | app/presenters/content_item_presenter.rb |
woople-theme-0.5.10 | app/presenters/content_item_presenter.rb |