Sha256: 604b555d2f5b9ce5b5a494dcb866ba3e50b3a45bbe5ffd07a68535e8159fef72

Contents?: true

Size: 367 Bytes

Versions: 96

Compression:

Stored size: 367 Bytes

Contents

module SafeYAML
  class Transform
    class ToNil
      include TransformationMap

      set_predefined_values({
        ""      => nil,
        "~"     => nil,
        "null"  => nil,
      })

      def transform?(value)
        return false if value.length > 4
        return PREDEFINED_VALUES.include?(value), PREDEFINED_VALUES[value]
      end
    end
  end
end

Version data entries

96 entries across 96 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_nil.rb
puppet-3.8.7 lib/puppet/vendor/safe_yaml/lib/safe_yaml/transform/to_nil.rb
puppet-3.8.7-x86-mingw32 lib/puppet/vendor/safe_yaml/lib/safe_yaml/transform/to_nil.rb
puppet-3.8.7-x64-mingw32 lib/puppet/vendor/safe_yaml/lib/safe_yaml/transform/to_nil.rb
puppet-3.8.6 lib/puppet/vendor/safe_yaml/lib/safe_yaml/transform/to_nil.rb
puppet-3.8.6-x86-mingw32 lib/puppet/vendor/safe_yaml/lib/safe_yaml/transform/to_nil.rb
puppet-retrospec-0.12.1 vendor/gems/puppet-3.7.3/lib/puppet/vendor/safe_yaml/lib/safe_yaml/transform/to_nil.rb
puppet-3.8.6-x64-mingw32 lib/puppet/vendor/safe_yaml/lib/safe_yaml/transform/to_nil.rb
puppet-retrospec-0.12.0 vendor/gems/puppet-3.7.3/lib/puppet/vendor/safe_yaml/lib/safe_yaml/transform/to_nil.rb
puppet-3.8.5 lib/puppet/vendor/safe_yaml/lib/safe_yaml/transform/to_nil.rb
puppet-3.8.5-x86-mingw32 lib/puppet/vendor/safe_yaml/lib/safe_yaml/transform/to_nil.rb
puppet-3.8.5-x64-mingw32 lib/puppet/vendor/safe_yaml/lib/safe_yaml/transform/to_nil.rb
puppet-3.8.4 lib/puppet/vendor/safe_yaml/lib/safe_yaml/transform/to_nil.rb
puppet-3.8.4-x86-mingw32 lib/puppet/vendor/safe_yaml/lib/safe_yaml/transform/to_nil.rb
puppet-3.8.4-x64-mingw32 lib/puppet/vendor/safe_yaml/lib/safe_yaml/transform/to_nil.rb
puppet-retrospec-0.11.0 vendor/gems/puppet-3.7.3/lib/puppet/vendor/safe_yaml/lib/safe_yaml/transform/to_nil.rb
puppet-retrospec-0.10.0 vendor/gems/puppet-3.7.3/lib/puppet/vendor/safe_yaml/lib/safe_yaml/transform/to_nil.rb
puppet-retrospec-0.9.1 vendor/gems/puppet-3.7.3/lib/puppet/vendor/safe_yaml/lib/safe_yaml/transform/to_nil.rb
puppet-retrospec-0.9.0 vendor/gems/puppet-3.7.3/lib/puppet/vendor/safe_yaml/lib/safe_yaml/transform/to_nil.rb
puppet-retrospec-0.8.1 vendor/gems/puppet-3.7.3/lib/puppet/vendor/safe_yaml/lib/safe_yaml/transform/to_nil.rb