Class: Mitake::Boolean Private
- Inherits:
-
Object
- Object
- Mitake::Boolean
- Defined in:
- lib/mitake/boolean.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
The helper object to define boolean value
Constant Summary collapse
- TRUE_VALUES =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
%w[Y 1 yes true].freeze
Class Method Summary collapse
-
.parse(value) ⇒ Object
private
Parse boolean value.
Class Method Details
.parse(value) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Parse boolean value
16 17 18 19 20 21 |
# File 'lib/mitake/boolean.rb', line 16 def parse(value) return true if value == true return true if TRUE_VALUES.include?(value) false end |