Class: ContentItemPresenter
Constant Summary
ContentImage::DEFAULT_IMAGE, ContentImage::MISSING_WOOPLE_IMAGE
Instance Method Summary
collapse
#image
enforce_definitions, #enforced_methods, #ensure_defined, #initialize
Instance Method Details
#completed_class ⇒ Object
35
36
37
|
# File 'app/presenters/content_item_presenter.rb', line 35
def completed_class
'completed' if source.completed?
end
|
18
19
20
|
# File 'app/presenters/content_item_presenter.rb', line 18
def render_certification_metadata(&block)
yield(source.certification_metadata) if source.certification_metadata.present?
end
|
#render_completed_on(&block) ⇒ Object
26
27
|
# File 'app/presenters/content_item_presenter.rb', line 26
def render_completed_on(&block)
end
|
#render_elective_points(&block) ⇒ Object
29
30
|
# File 'app/presenters/content_item_presenter.rb', line 29
def render_elective_points(&block)
end
|
#render_essential_duration(&block) ⇒ Object
32
33
|
# File 'app/presenters/content_item_presenter.rb', line 32
def render_essential_duration(&block)
end
|
#render_popularity {|source.popularity| ... } ⇒ Object
14
15
16
|
# File 'app/presenters/content_item_presenter.rb', line 14
def render_popularity(&block)
yield(source.popularity)
end
|
#render_progress_bar {|source.percent_complete| ... } ⇒ Object
22
23
24
|
# File 'app/presenters/content_item_presenter.rb', line 22
def render_progress_bar(&block)
yield(source.percent_complete) if source.percent_complete.present?
end
|
#render_time_remaining {|source.time_remaining, source.time_total| ... } ⇒ Object
10
11
12
|
# File 'app/presenters/content_item_presenter.rb', line 10
def render_time_remaining(&block)
yield(source.time_remaining, source.time_total)
end
|