Sha256: fa8ec14b10e8b33bb5b618db55344f9d201b43db7366711fb7c8ca595089b832

Contents?: true

Size: 205 Bytes

Versions: 1

Compression:

Stored size: 205 Bytes

Contents

require 'date'

module UniversalValidators
  class DateValidator
    def initialize(date)
      @date = date.to_s
    end

    def valid?
      Date.parse(@date).is_a?(Date) rescue false
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
universal_validators-1.0.0 lib/universal_validators/date_validator.rb