Sha256: 12197f16aa7ea5d21c59a326cc9e1add3d1373df794c2bfbe812bfd1ca410ef3

Contents?: true

Size: 366 Bytes

Versions: 168

Compression:

Stored size: 366 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

168 entries across 146 versions & 15 rubygems

Version Path
brakeman-4.8.1 bundle/ruby/2.4.0/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/to_nil.rb
cloudsmith-api-0.49.118 vendor/bundle/ruby/2.6.0/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/to_nil.rb
cloudsmith-api-0.49.98 vendor/bundle/ruby/2.6.0/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/to_nil.rb
cloudsmith-api-0.49.94 vendor/bundle/ruby/2.6.0/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/to_nil.rb
brakeman-4.8.0 bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/to_nil.rb
cloudsmith-api-0.49.21 vendor/bundle/ruby/2.6.0/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/to_nil.rb
cloudsmith-api-0.49.15 vendor/bundle/ruby/2.6.0/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/to_nil.rb
cloudsmith-api-0.49.13 vendor/bundle/ruby/2.6.0/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/to_nil.rb
cloudsmith-api-0.49.9 vendor/bundle/ruby/2.3.0/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/to_nil.rb
vagrant-unbundled-2.2.7.0 vendor/bundle/ruby/2.6.0/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/to_nil.rb
vagrant-unbundled-2.2.7.0 vendor/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/to_nil.rb
vagrant-unbundled-2.2.7.0 vendor/bundle/ruby/2.4.0/gems/safe_yaml-1.0.4/lib/safe_yaml/transform/to_nil.rb
honeybadger-4.5.3 vendor/bundle/ruby/2.6.0/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/to_nil.rb
zuora_connect_ui-0.10.0 vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/to_nil.rb
zuora_connect_ui-0.10.0 vendor/ruby/2.6.0/gems/brakeman-4.7.1/bundle/ruby/2.6.0/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/to_nil.rb
zuora_connect_ui-0.10.0 vendor/ruby/2.6.0/gems/brakeman-4.5.1/bundle/ruby/2.5.0/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/to_nil.rb
zuora_connect_ui-0.10.0 vendor/ruby/2.6.0/gems/brakeman-4.7.0/bundle/ruby/2.6.0/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/to_nil.rb
zuora_connect_ui-0.10.0 vendor/ruby/2.6.0/gems/brakeman-4.7.2/bundle/ruby/2.6.0/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/to_nil.rb
brakeman-4.7.2 bundle/ruby/2.6.0/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/to_nil.rb
vagrant-unbundled-2.2.6.2 vendor/bundle/ruby/2.6.0/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/to_nil.rb