Sha256: b0e03b83b91de89d288a0c89b8ab8f2378ca8bebe364e2839ce2e4b4538b150e

Contents?: true

Size: 290 Bytes

Versions: 105

Compression:

Stored size: 290 Bytes

Contents

module SafeYAML
  class Transform
    class ToDate
      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
    end
  end
end

Version data entries

105 entries across 105 versions & 3 rubygems

Version Path
puppet-retrospec-0.12.2 vendor/gems/puppet-3.7.3/lib/puppet/vendor/safe_yaml/lib/safe_yaml/transform/to_date.rb
puppet-3.8.7 lib/puppet/vendor/safe_yaml/lib/safe_yaml/transform/to_date.rb
puppet-3.8.7-x86-mingw32 lib/puppet/vendor/safe_yaml/lib/safe_yaml/transform/to_date.rb
puppet-3.8.7-x64-mingw32 lib/puppet/vendor/safe_yaml/lib/safe_yaml/transform/to_date.rb
puppet-3.8.6 lib/puppet/vendor/safe_yaml/lib/safe_yaml/transform/to_date.rb
puppet-3.8.6-x86-mingw32 lib/puppet/vendor/safe_yaml/lib/safe_yaml/transform/to_date.rb
puppet-retrospec-0.12.1 vendor/gems/puppet-3.7.3/lib/puppet/vendor/safe_yaml/lib/safe_yaml/transform/to_date.rb
puppet-3.8.6-x64-mingw32 lib/puppet/vendor/safe_yaml/lib/safe_yaml/transform/to_date.rb
puppet-retrospec-0.12.0 vendor/gems/puppet-3.7.3/lib/puppet/vendor/safe_yaml/lib/safe_yaml/transform/to_date.rb
puppet-3.8.5 lib/puppet/vendor/safe_yaml/lib/safe_yaml/transform/to_date.rb
puppet-3.8.5-x86-mingw32 lib/puppet/vendor/safe_yaml/lib/safe_yaml/transform/to_date.rb
puppet-3.8.5-x64-mingw32 lib/puppet/vendor/safe_yaml/lib/safe_yaml/transform/to_date.rb
puppet-3.8.4 lib/puppet/vendor/safe_yaml/lib/safe_yaml/transform/to_date.rb
puppet-3.8.4-x86-mingw32 lib/puppet/vendor/safe_yaml/lib/safe_yaml/transform/to_date.rb
puppet-3.8.4-x64-mingw32 lib/puppet/vendor/safe_yaml/lib/safe_yaml/transform/to_date.rb
puppet-retrospec-0.11.0 vendor/gems/puppet-3.7.3/lib/puppet/vendor/safe_yaml/lib/safe_yaml/transform/to_date.rb
puppet-retrospec-0.10.0 vendor/gems/puppet-3.7.3/lib/puppet/vendor/safe_yaml/lib/safe_yaml/transform/to_date.rb
puppet-retrospec-0.9.1 vendor/gems/puppet-3.7.3/lib/puppet/vendor/safe_yaml/lib/safe_yaml/transform/to_date.rb
puppet-retrospec-0.9.0 vendor/gems/puppet-3.7.3/lib/puppet/vendor/safe_yaml/lib/safe_yaml/transform/to_date.rb
puppet-retrospec-0.8.1 vendor/gems/puppet-3.7.3/lib/puppet/vendor/safe_yaml/lib/safe_yaml/transform/to_date.rb