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