Class: SafeYAML::Transform::ToDate

### Home Classes Methods

### In Files

- lib/safe_yaml/transform/to_date.rb

### Parent

Object

### Methods

- #transform?

### Class/Module Index

Quicksearch

- SafeYAML
- SafeYAML::Deep
- SafeYAML::Parse
- SafeYAML::Parse::Date
- SafeYAML::Parse::Hexadecimal
- SafeYAML::Parse::Sexagesimal
- SafeYAML::PsychHandler
- SafeYAML::PsychResolver
- SafeYAML::Resolver
- SafeYAML::SafeToRubyVisitor
- SafeYAML::SyckResolver
- SafeYAML::Transform
- SafeYAML::Transform::ToBoolean
- SafeYAML::Transform::ToDate
- SafeYAML::Transform::ToFloat
- SafeYAML::Transform::ToInteger
- SafeYAML::Transform::ToNil
- SafeYAML::Transform::ToSymbol
- SafeYAML::Transform::TransformationMap
- SafeYAML::Transform::TransformationMap::CaseAgnosticMap
- SafeYAML::Transform::TransformationMap::ClassMethods
- Object
- YAML

No matching classes.

# SafeYAML::Transform::ToDate

### Public Instance Methods

transform?(value) click to toggle source

    # File lib/safe_yaml/transform/to_date.rb, line 4
    def transform?(value)
      return true, Date.parse(value) if Parse::Date::DATE_MATCHER.match(value)
      return true, Parse::Date.value(value) if Parse::Date::TIME_MATCHER.match(value)
      false
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.