Class: Valuedate::OptionalValue

Inherits:
Valuedate show all
Defined in:
lib/valuedate.rb

Instance Attribute Summary

Attributes inherited from Valuedate

#errors

Instance Method Summary collapse

Methods inherited from Valuedate

#call, #collect_errors!, #error, #hash, #initialize, matcher, #method_missing, schema, #valid?, validate, #validate!

Constructor Details

This class inherits a constructor from Valuedate

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Valuedate

Instance Method Details

#validate(value = nil) ⇒ Object



34
35
36
# File 'lib/valuedate.rb', line 34

def validate(value = nil)
  value.nil? || super
end