Class: SafeYAML::Transform::ToBoolean
- Inherits:
-
Object
- Object
- SafeYAML::Transform::ToBoolean
- Includes:
- TransformationMap
- Defined in:
- lib/safe_yaml/transform/to_boolean.rb
Instance Method Summary collapse
Methods included from TransformationMap
Instance Method Details
#transform?(value) ⇒ 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 |