Class: OutlinePresenter
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- OutlinePresenter
- Includes:
- ActionView::Helpers::TagHelper
- Defined in:
- app/presenters/outline_presenter.rb
Instance Attribute Summary collapse
-
#view_context ⇒ Object
Returns the value of attribute view_context.
Instance Method Summary collapse
- #assessment ⇒ Object
- #downloads(downloads = outline.downloads) ⇒ Object
- #name ⇒ Object
- #videos(videos = outline.videos) ⇒ Object
Instance Attribute Details
#view_context ⇒ Object
Returns the value of attribute view_context.
7 8 9 |
# File 'app/presenters/outline_presenter.rb', line 7 def view_context @view_context end |
Instance Method Details
#assessment ⇒ Object
23 24 25 26 |
# File 'app/presenters/outline_presenter.rb', line 23 def assessment wrapped_assessment = ThemePresentation.wrap(outline.assessment, OutlineAssessmentPresenter) view_context.render partial: 'woople-theme/outline_assessment', locals: { assessment: wrapped_assessment } end |
#downloads(downloads = outline.downloads) ⇒ Object
18 19 20 21 |
# File 'app/presenters/outline_presenter.rb', line 18 def downloads(downloads = outline.downloads) wrapped_downloads = ThemePresentation.wrap_collection(downloads, OutlineDownloadPresenter) view_context.render partial: 'woople-theme/outline_downloads', locals: { downloads: wrapped_downloads } end |
#name ⇒ Object
9 10 11 |
# File 'app/presenters/outline_presenter.rb', line 9 def name content_tag(:h2, outline.name) end |
#videos(videos = outline.videos) ⇒ Object
13 14 15 16 |
# File 'app/presenters/outline_presenter.rb', line 13 def videos(videos = outline.videos) wrapped_videos = ThemePresentation.wrap_collection(videos, OutlineVideoPresenter) view_context.render partial: 'woople-theme/outline_videos', locals: { videos: wrapped_videos } end |