lib/ids_please/facebook.rb in ids_please-1.1.0 vs lib/ids_please/facebook.rb in ids_please-1.1.1

- old
+ new

@@ -1,20 +1,22 @@ class IdsPlease class Facebook < IdsPlease::BaseParser MASK = /fb\.me|fb\.com|facebook/i - private + class << self + private - def self.parse_link(link) - query = CGI.parse(link.query) if link.query && !link.query.empty? + def parse_link(link) + query = CGI.parse(link.query) if link.query && !link.query.empty? - if query && !query['id'].empty? - query['id'].first - elsif link.path =~ /\/pages\// - link.path.split('/').last - else - link.path.split('/')[1] + if query && !query['id'].empty? + query['id'].first + elsif link.path =~ /\/pages\// + link.path.split('/').last + else + link.path.split('/')[1] + end end end end end