Sha256: 9fa64835be8de2538572ec69be66881cf39a5e97e41c98919ae62891dc9e04fd

Contents?: true

Size: 303 Bytes

Versions: 1

Compression:

Stored size: 303 Bytes

Contents

class IdsPlease
  class Twitter < IdsPlease::BaseParser

    MASK = /twitter/i

    private

    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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ids_please-1.1.0 lib/ids_please/twitter.rb