Class: Defoker::DateBaseNameValidators
- Inherits:
-
Object
- Object
- Defoker::DateBaseNameValidators
- Defined in:
- lib/date_base_name.rb
Overview
Validators
Class Method Summary collapse
Class Method Details
.validate_date(date) ⇒ Object
155 156 157 158 |
# File 'lib/date_base_name.rb', line 155 def self.validate_date(date) return if [Date, DateTime].include?(date.class) fail ArgumentError, "invalid argument type #{date.class}" end |