Sha256: dd603ea685ae77e366cf77fcd9aeb1c43eeb3b1de64d77a6ec17b4f99c8ce965
Contents?: true
Size: 825 Bytes
Versions: 36
Compression:
Stored size: 825 Bytes
Contents
require 'explicit_delegator' require_relative 'content_image' class ContentItemPresenter < ExplicitDelegator include ContentImage enforce_definitions :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 private def source @delegate end end
Version data entries
36 entries across 36 versions & 1 rubygems