Module: Mdarby::Acts::Acts_as_video_fu::InstanceMethods
- Defined in:
- lib/acts_as_video_fu.rb
Instance Method Summary collapse
Instance Method Details
#type ⇒ Object
26 27 28 29 30 |
# File 'lib/acts_as_video_fu.rb', line 26 def type return YouTube if youtube? return Vimeo if vimeo? return false end |
#vimeo? ⇒ Boolean
36 37 38 |
# File 'lib/acts_as_video_fu.rb', line 36 def vimeo? VIMEO_RE =~ video_url end |
#youtube? ⇒ Boolean
32 33 34 |
# File 'lib/acts_as_video_fu.rb', line 32 def youtube? YOUTUBE_RE =~ video_url end |