Class: CoronaPresenceTracing::CheckInValidator
- Inherits:
-
Object
- Object
- CoronaPresenceTracing::CheckInValidator
- Defined in:
- lib/corona_presence_tracing/validator.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(check_in) ⇒ CheckInValidator
constructor
A new instance of CheckInValidator.
- #validate ⇒ Object
Constructor Details
#initialize(check_in) ⇒ CheckInValidator
Returns a new instance of CheckInValidator.
16 17 18 |
# File 'lib/corona_presence_tracing/validator.rb', line 16 def initialize(check_in) @check_in = check_in end |
Instance Method Details
#validate ⇒ Object
20 21 22 23 24 25 26 |
# File 'lib/corona_presence_tracing/validator.rb', line 20 def validate validate_presence_of :description, :address validate_type_of :description, :address, %w[String] validate_length_of :description, :address, max: 100 validate_type_of :start_time, :end_time, %w[DateTime Time Date ActiveSupport::TimeWithZone] validate_dates end |