Class: Lcms::Engine::MediaPresenter
Instance Method Summary
collapse
#categorized_downloads_list, #downloads_indent, #page_title, #subject_and_grade_title
Instance Method Details
#embed_podcast ⇒ Object
10
11
12
|
# File 'app/presenters/lcms/engine/media_presenter.rb', line 10
def embed_podcast
MediaEmbed.soundcloud(url, try(:subject).try(:to_sym)) if url.match?(/soundcloud/)
end
|
#embed_video_url ⇒ Object
14
15
16
|
# File 'app/presenters/lcms/engine/media_presenter.rb', line 14
def embed_video_url
url.match?(/vimeo/) ? embed_video_vimeo_url : embed_video_youtube_url
end
|
6
7
8
|
# File 'app/presenters/lcms/engine/media_presenter.rb', line 6
def media_title
[subject, resource_type].compact.join(' ').titleize
end
|