Class: Shoulda::Matchers::ActiveModel::RequireAValidDomainNameMatcher
- Inherits:
-
ValidationMatcher
- Object
- ValidationMatcher
- Shoulda::Matchers::ActiveModel::RequireAValidDomainNameMatcher
- Defined in:
- lib/validates_host/require_a_valid_domain_name_matcher.rb
Instance Method Summary collapse
Instance Method Details
#description ⇒ Object
11 12 13 |
# File 'lib/validates_host/require_a_valid_domain_name_matcher.rb', line 11 def description "require #{@attribute} to be a valid domain name" end |
#matches?(subject) ⇒ Boolean
15 16 17 18 19 |
# File 'lib/validates_host/require_a_valid_domain_name_matcher.rb', line 15 def matches?(subject) super(subject) disallows_invalid_value and allows_valid_value end |