Class: IdsPlease::Twitter
- Inherits:
-
BaseParser
- Object
- BaseParser
- IdsPlease::Twitter
- Defined in:
- lib/ids_please/twitter.rb
Constant Summary collapse
- MASK =
/twitter/i
Class Method Summary collapse
Methods inherited from BaseParser
Class Method Details
.parse_link(link) ⇒ Object
5 6 7 8 9 10 11 12 |
# File 'lib/ids_please/twitter.rb', line 5 def self.parse_link(link) if link.path =~ /%23!/ id = link.path.sub(/\A\/%23!\//, '') id.split(/[\/\?#]/).first else link.path.split('/')[1] end end |