Sha256: 5efc8eb1afce877313a46f82f9bb10a1e6b78e5cd46d6660f8e66104774c1798
Contents?: true
Size: 834 Bytes
Versions: 17
Compression:
Stored size: 834 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 private def source __getobj__ end end
Version data entries
17 entries across 17 versions & 1 rubygems