Parent

Methods

SafeYAML::Transform::ToDate

Constants

MATCHER

Public Instance Methods

transform?(value) click to toggle source
# File lib/safe_yaml/transform/to_date.rb, line 6
def transform?(value)
  return false unless MATCHER.match(value)
  date = Date.parse(value) rescue nil
  return !!date, date
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.