Class: OutlinePresenter

Inherits:
SimpleDelegator
  • Object
show all
Defined in:
app/presenters/outline_presenter.rb

Instance Method Summary collapse

Instance Method Details

#assessment {|css_class| ... } ⇒ Object

Yields:

  • (css_class)


4
5
6
7
8
9
# File 'app/presenters/outline_presenter.rb', line 4

def assessment
  css_class = "assessment"
  css_class << " disabled" if assessment_disabled?

  yield(css_class) if has_assessment?
end

#render_downloads(view_context) ⇒ Object



11
12
13
14
# File 'app/presenters/outline_presenter.rb', line 11

def render_downloads(view_context)
  wrapped_downloads = ThemePresentation.wrap_collection(downloads, OutlineDownloadPresenter)
  view_context.render partial: 'woople-theme/outline_download', collection: wrapped_downloads
end

#render_videos(view_context) ⇒ Object



16
17
18
19
# File 'app/presenters/outline_presenter.rb', line 16

def render_videos(view_context)
  wrapped_videos = ThemePresentation.wrap_collection(videos, OutlineVideoPresenter)
  view_context.render partial: 'woople-theme/outline_video', collection: wrapped_videos
end