lib/ids_please/twitter.rb in ids_please-0.0.3 vs lib/ids_please/twitter.rb in ids_please-1.0.0
- old
+ new
@@ -1,14 +1,16 @@
-class IdsPlease::Twitter < IdsPlease::BaseParser
+class IdsPlease
+ class Twitter < IdsPlease::BaseParser
- MASK = /twitter/i
+ MASK = /twitter/i
- def self.parse_link(link)
- if link.path =~ /%23!/
- id = link.path.sub(/\A\/%23!\//, '')
- id.split(/[\/\?#]/).first
- else
- link.path.split('/')[1]
+ 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
- end
+ end
end