Class: IdsPlease::Youtube
- Inherits:
-
BaseParser
- Object
- BaseParser
- IdsPlease::Youtube
- Defined in:
- lib/ids_please/youtube.rb
Constant Summary collapse
- MASK =
/youtu\.be|youtube/i
Class Method Summary collapse
Methods inherited from BaseParser
Class Method Details
.parse_link(link) ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/ids_please/youtube.rb', line 5 def self.parse_link(link) if link.path =~ /channels/ link.path.split('/')[2] else link.path.split('/')[1] end end |