Module: Gadgeto::Domain::Validators

Included in:
Gadgeto::Domain
Defined in:
lib/gadgeto/domain/validators.rb

Instance Method Summary collapse

Instance Method Details

#domain?(domain_name) ⇒ Boolean

Returns:

  • (Boolean)


6
7
8
# File 'lib/gadgeto/domain/validators.rb', line 6

def domain?(domain_name)
  !!(domain_name =~ domain_regex(0..10))
end

#third_level_domain?(domain_name) ⇒ Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/gadgeto/domain/validators.rb', line 10

def third_level_domain?(domain_name)
  !!(domain_name =~ domain_regex(3))
end