Class: ActiveInteractor::Type::Boolean
- Defined in:
- lib/active_interactor/type/boolean.rb
Constant Summary collapse
- TRUE_VALUES =
[true, 1, '1', 't', 'T', 'true', 'TRUE', 'on', 'ON', 'yes', 'YES'].freeze
- FALSE_VALUES =
[false, 0, '0', 'f', 'F', 'false', 'FALSE', 'off', 'OFF', 'no', 'NO'].freeze
Class Method Summary collapse
Class Method Details
.valid?(value) ⇒ Boolean
9 10 11 |
# File 'lib/active_interactor/type/boolean.rb', line 9 def self.valid?(value) (TRUE_VALUES + FALSE_VALUES).include?(value) end |