Sha256: 49ed17f370ab11ca3d5d118e7f4fa0f18753ff51684e56e3cef5b06bbcca6510
Contents?: true
Size: 812 Bytes
Versions: 1
Compression:
Stored size: 812 Bytes
Contents
require 'delegate' 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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
woople-theme-0.5.9 | app/presenters/content_item_presenter.rb |