Class: KnowledgeBase::Sectionables::Video
- Inherits:
-
Sectionable
- Object
- ActiveRecord::Base
- Sectionable
- KnowledgeBase::Sectionables::Video
- Defined in:
- app/models/knowledge_base/sectionables/video.rb
Constant Summary collapse
- VIDEO_ID_EXPRESSION =
%r{^https?://(?:(?:www|m)\.)?youtube\.com/watch\?v=([^&]+)}
Instance Method Summary collapse
Instance Method Details
#to_s ⇒ Object
9 10 11 |
# File 'app/models/knowledge_base/sectionables/video.rb', line 9 def to_s "#{super}: #{url}" end |
#youtube_id ⇒ Object
5 6 7 |
# File 'app/models/knowledge_base/sectionables/video.rb', line 5 def youtube_id url[VIDEO_ID_EXPRESSION, 1] end |