Class: Gadgeto::Domain

Inherits:
Object
  • Object
show all
Includes:
Validators
Defined in:
lib/gadgeto/domain.rb,
lib/gadgeto/domain/validators.rb

Defined Under Namespace

Modules: Validators

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Validators

#domain?

Constructor Details

#initialize(domain) ⇒ Domain

Returns a new instance of Domain.



15
16
17
# File 'lib/gadgeto/domain.rb', line 15

def initialize(domain)
  @domain = domain
end

Class Method Details

.valid?(object) ⇒ Boolean

Returns:

  • (Boolean)


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

def valid?(object)
  o = new object
  o.valid?
end

Instance Method Details

#third_level_domain?Boolean

Returns:

  • (Boolean)


23
24
25
# File 'lib/gadgeto/domain.rb', line 23

def third_level_domain?
  super(@domain)
end

#valid?Boolean

Returns:

  • (Boolean)


19
20
21
# File 'lib/gadgeto/domain.rb', line 19

def valid?
  domain? @domain
end