Class: WoopleTheme::Dashboard::ElectiveHistoryPresenter

Inherits:
ContentItemPresenter show all
Includes:
ContentImage
Defined in:
app/presenters/woople_theme/dashboard/elective_history_presenter.rb

Constant Summary

Constants included from ContentImage

ContentImage::DEFAULT_IMAGE, ContentImage::MISSING_WOOPLE_IMAGE

Instance Method Summary collapse

Methods included from ContentImage

#image

Methods inherited from ContentItemPresenter

#completed_class, #render_essential_duration

Methods inherited from ExplicitDelegator

enforce_definitions, #enforced_methods, #ensure_defined, #initialize

Constructor Details

This class inherits a constructor from ExplicitDelegator

Instance Method Details

#formatted_completed_onObject



32
33
34
35
36
37
38
# File 'app/presenters/woople_theme/dashboard/elective_history_presenter.rb', line 32

def formatted_completed_on
  if completed_on.nil?
    I18n.t('woople_theme.dashboards.member.electives_section.in_progress')
  else
    WoopleThemeI18n.l(completed_on.to_date)
  end
end

#render_certification_metadata(&block) ⇒ Object



18
19
# File 'app/presenters/woople_theme/dashboard/elective_history_presenter.rb', line 18

def (&block)
end

#render_completed_on {|formatted_completed_on| ... } ⇒ Object



28
29
30
# File 'app/presenters/woople_theme/dashboard/elective_history_presenter.rb', line 28

def render_completed_on(&block)
  yield(formatted_completed_on)
end

#render_elective_points {|points_metadata| ... } ⇒ Object

Yields:

  • (points_metadata)


24
25
26
# File 'app/presenters/woople_theme/dashboard/elective_history_presenter.rb', line 24

def render_elective_points(&block)
  yield()
end

#render_popularity(&block) ⇒ Object



15
16
# File 'app/presenters/woople_theme/dashboard/elective_history_presenter.rb', line 15

def render_popularity(&block)
end

#render_progress_bar(&block) ⇒ Object



21
22
# File 'app/presenters/woople_theme/dashboard/elective_history_presenter.rb', line 21

def render_progress_bar(&block)
end

#render_time_remaining(&block) ⇒ Object



12
13
# File 'app/presenters/woople_theme/dashboard/elective_history_presenter.rb', line 12

def render_time_remaining(&block)
end