Class: Gadgeto::Domain
- Inherits:
-
Object
- Object
- Gadgeto::Domain
- 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
-
#initialize(domain) ⇒ Domain
constructor
A new instance of Domain.
- #third_level_domain? ⇒ Boolean
- #valid? ⇒ Boolean
Methods included from Validators
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
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
23 24 25 |
# File 'lib/gadgeto/domain.rb', line 23 def third_level_domain? super(@domain) end |
#valid? ⇒ Boolean
19 20 21 |
# File 'lib/gadgeto/domain.rb', line 19 def valid? domain? @domain end |