Class: Lcms::Engine::MediaPresenter

Inherits:
ResourcePresenter show all
Defined in:
app/presenters/lcms/engine/media_presenter.rb

Instance Method Summary collapse

Methods inherited from ResourcePresenter

#categorized_downloads_list, #downloads_indent, #page_title, #subject_and_grade_title

Instance Method Details

#embed_podcastObject



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_urlObject



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

#media_titleObject



6
7
8
# File 'app/presenters/lcms/engine/media_presenter.rb', line 6

def media_title
  [subject, resource_type].compact.join(' ').titleize
end