Class: ActiveStorageValidations::Matchers::PagesValidatorMatcher
- Inherits:
-
BaseComparisonValidatorMatcher
- Object
- BaseComparisonValidatorMatcher
- ActiveStorageValidations::Matchers::PagesValidatorMatcher
- Includes:
- ASVTimeoutable
- Defined in:
- lib/active_storage_validations/matchers/pages_validator_matcher.rb
Constant Summary
Constants included from ASVTimeoutable
Instance Method Summary collapse
- #description ⇒ Object
- #failure_message ⇒ Object
-
#initialize(attribute_name) ⇒ PagesValidatorMatcher
constructor
A new instance of PagesValidatorMatcher.
Methods included from ASVTimeoutable
#initialize_timeoutable, #timeout
Methods inherited from BaseComparisonValidatorMatcher
#between, #equal_to, #greater_than, #greater_than_or_equal_to, #less_than, #less_than_or_equal_to, #matches?
Methods included from ASVRspecable
#failure_message_when_negated, #initialize_rspecable
Methods included from ASVMessageable
#initialize_messageable, #with_message
Methods included from ASVExceptOnable
#except_on, #initialize_except_onable
Methods included from ASVContextable
Methods included from ASVAllowBlankable
#allow_blank, #initialize_allow_blankable
Constructor Details
#initialize(attribute_name) ⇒ PagesValidatorMatcher
Returns a new instance of PagesValidatorMatcher.
15 16 17 18 |
# File 'lib/active_storage_validations/matchers/pages_validator_matcher.rb', line 15 def initialize(attribute_name) super initialize_timeoutable end |
Instance Method Details
#description ⇒ Object
20 21 22 |
# File 'lib/active_storage_validations/matchers/pages_validator_matcher.rb', line 20 def description "validate file number of pages of :#{@attribute_name}" end |
#failure_message ⇒ Object
24 25 26 27 28 |
# File 'lib/active_storage_validations/matchers/pages_validator_matcher.rb', line 24 def = [ "is expected to validate file number of pages of :#{@attribute_name}" ] () .join("\n") end |