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-3.5.1-x86-mingw32 lib/puppet/vendor/safe_yaml/lib/safe_yaml/transform/to_date.rb
puppet-3.5.1.rc1 lib/puppet/vendor/safe_yaml/lib/safe_yaml/transform/to_date.rb
puppet-3.5.1.rc1-x86-mingw32 lib/puppet/vendor/safe_yaml/lib/safe_yaml/transform/to_date.rb
puppet-3.5.0.rc3 lib/puppet/vendor/safe_yaml/lib/safe_yaml/transform/to_date.rb
puppet-3.5.0.rc3-x86-mingw32 lib/puppet/vendor/safe_yaml/lib/safe_yaml/transform/to_date.rb
puppet-3.5.0.rc2 lib/puppet/vendor/safe_yaml/lib/safe_yaml/transform/to_date.rb
puppet-3.5.0.rc2-x86-mingw32 lib/puppet/vendor/safe_yaml/lib/safe_yaml/transform/to_date.rb
puppet-3.5.0.rc1 lib/puppet/vendor/safe_yaml/lib/safe_yaml/transform/to_date.rb
puppet-3.5.0.rc1-x86-mingw32 lib/puppet/vendor/safe_yaml/lib/safe_yaml/transform/to_date.rb
puppet-3.4.3 lib/puppet/vendor/safe_yaml/lib/safe_yaml/transform/to_date.rb
puppet-2.7.25 lib/puppet/vendor/safe_yaml/lib/safe_yaml/transform/to_date.rb
puppet-3.4.2 lib/puppet/vendor/safe_yaml/lib/safe_yaml/transform/to_date.rb
safe_yaml-1.0.0 lib/safe_yaml/transform/to_date.rb
puppet-2.7.24 lib/puppet/vendor/safe_yaml/lib/safe_yaml/transform/to_date.rb
puppet-3.4.1 lib/puppet/vendor/safe_yaml/lib/safe_yaml/transform/to_date.rb
puppet-3.4.0 lib/puppet/vendor/safe_yaml/lib/safe_yaml/transform/to_date.rb
safe_yaml-1.0.0rc2 lib/safe_yaml/transform/to_date.rb
puppet-3.4.0.rc2 lib/puppet/vendor/safe_yaml/lib/safe_yaml/transform/to_date.rb
safe_yaml-1.0.0rc1 lib/safe_yaml/transform/to_date.rb
puppet-3.4.0.rc1 lib/puppet/vendor/safe_yaml/lib/safe_yaml/transform/to_date.rb