Class: SafeYAML::Transform::ToNil

Inherits:
Object
  • Object
show all
Includes:
TransformationMap
Defined in:
lib/safe_yaml/transform/to_nil.rb

Instance Method Summary collapse

Methods included from TransformationMap

included

Instance Method Details

#transform?(value) ⇒ Boolean

Returns:

  • (Boolean)


12
13
14
15
# File 'lib/safe_yaml/transform/to_nil.rb', line 12

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