Sha256: a67e121c3b7484f9c04db4dccc5519ca5b8f743eb354390f85ac10355fe236d7

Contents?: true

Size: 264 Bytes

Versions: 1

Compression:

Stored size: 264 Bytes

Contents

require 'ipaddr'

module Legitbot
  # https://support.apple.com/en-us/HT204683

  class Apple < BotMatch
    Range = IPAddr.new('17.0.0.0/8')

    def valid?
      ip = IPAddr.new @ip
      Range.include? ip
    end
  end

  rule Legitbot::Apple, %w(Applebot)
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
legitbot-0.1.2 lib/legitbot/apple.rb