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
11 12 13 |
# File 'lib/validates_host/require_a_valid_subnet_matcher.rb', line 11 def description "require #{@attribute} to be a valid subnet" end |
#matches?(subject) ⇒ Boolean
15 16 17 18 19 |
# File 'lib/validates_host/require_a_valid_subnet_matcher.rb', line 15 def matches?(subject) super(subject) disallows_invalid_value and allows_valid_value end |