Module: Legitbot::Validators::IpRanges

Included in:
BotMatch
Defined in:
lib/legitbot/validators/ip_ranges.rb

Overview

In a bot matcher: ‘ip_ranges ip, range, ip, …` `ip_ranges do [ip, range, …]; end`

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



14
15
16
# File 'lib/legitbot/validators/ip_ranges.rb', line 14

def included(base)
  base.extend ClassMethods
end

Instance Method Details

#valid_ip?Boolean

Returns:

  • (Boolean)


19
20
21
# File 'lib/legitbot/validators/ip_ranges.rb', line 19

def valid_ip?
  self.class.valid_ip?(@ip)
end