class UseCaseValidations::Validator
Attributes
base[RW]
options[R]
Public Class Methods
new(options = {})
click to toggle source
# File lib/usecasing_validations/validator.rb, line 8 def initialize(options = {}) @options = Helpers._except(options, :class).freeze end
Public Instance Methods
validate(record)
click to toggle source
Override this method in subclasses with validation logic, adding errors to the records errors
array where necessary.
# File lib/usecasing_validations/validator.rb, line 14 def validate(record) raise NotImplementedError, "Subclasses must implement a validate(record) method." end