Sha256: 9c1a9b1ec6d0598ea90ca6c3aac582c900718c556987b1efe9d26afe4e96aa34

Contents?: true

Size: 342 Bytes

Versions: 3

Compression:

Stored size: 342 Bytes

Contents

class IdsPlease
  class Twitter < IdsPlease::BaseParser

    MASK = /twitter/i

    class << self
      private

      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

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ids_please-1.1.3 lib/ids_please/twitter.rb
ids_please-1.1.2 lib/ids_please/twitter.rb
ids_please-1.1.1 lib/ids_please/twitter.rb