Module: Rwc::Core::Concerns::Validation
- Included in:
- BaseInput
- Defined in:
- lib/rwc/core/concerns/validation.rb
Overview
Provides validation methods for input classes.
Instance Method Summary collapse
-
#valid? ⇒ Boolean
Checks if the input is valid by running validations.
-
#validate! ⇒ Object
Validates the input.
Instance Method Details
#valid? ⇒ Boolean
Checks if the input is valid by running validations.
11 12 13 14 |
# File 'lib/rwc/core/concerns/validation.rb', line 11 def valid? validate! errors.empty? end |
#validate! ⇒ Object
Validates the input. Must be implemented by including class.
19 20 21 |
# File 'lib/rwc/core/concerns/validation.rb', line 19 def validate! raise NotImplementedError end |