Class: SafeYAML::Transform::ToBoolean

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

Instance Method Summary collapse

Methods included from TransformationMap

included

Instance Method Details

#transform?(value) ⇒ Boolean

Returns:

  • (Boolean)


15
16
17
18
# File 'lib/safe_yaml/transform/to_boolean.rb', line 15

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