Class: Shoulda::Matchers::ActiveModel::RequireAValidSubnetMatcher
- Inherits:
-
ValidationMatcher
- Object
- ValidationMatcher
- Shoulda::Matchers::ActiveModel::RequireAValidSubnetMatcher
- Defined in:
- lib/validates_host/require_a_valid_subnet_matcher.rb
Instance Method Summary collapse
Instance Method Details
#description ⇒ Object
13 14 15 |
# File 'lib/validates_host/require_a_valid_subnet_matcher.rb', line 13 def description "require #{@attribute} to be a valid subnet" end |
#matches?(subject) ⇒ Boolean
17 18 19 20 21 |
# File 'lib/validates_host/require_a_valid_subnet_matcher.rb', line 17 def matches?(subject) super(subject) disallows_invalid_value && allows_valid_value end |