Class: IdsPlease::Odnoklassniki
- Inherits:
-
BaseParser
- Object
- BaseParser
- IdsPlease::Odnoklassniki
- Defined in:
- lib/ids_please/odnoklassniki.rb
Constant Summary collapse
- MASK =
/odnoklassniki/i
Class Method Summary collapse
Methods inherited from BaseParser
Class Method Details
.parse_link(link) ⇒ Object
6 7 8 9 10 11 12 13 14 |
# File 'lib/ids_please/odnoklassniki.rb', line 6 def self.parse_link(link) if matched = link.path.match(/\/(\d{2,})/) matched[1] elsif link.path =~ /\/about\// link.path.split('/')[-2] elsif link.path.split('/').size >= 3 link.path.split('/')[2] end end |