Method: ATypes::BooleanWrap.try_convert
- Defined in:
- lib/a_types/decorators/boolean_wrap.rb
.try_convert(source) ⇒ true, ...
Will try to convert given object to a boolean value according to #to_bool!. If this fails, it will return nil.
153 154 155 |
# File 'lib/a_types/decorators/boolean_wrap.rb', line 153 def self.try_convert(source) new(source).to_bool! end |