Class: RailsSettingsUi::ValueTypes::Boolean
- Defined in:
- lib/rails-settings-ui/value_types/boolean.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
#initialize, #valid?, #value_numeric?
Constructor Details
This class inherits a constructor from RailsSettingsUi::ValueTypes::Base
Instance Method Details
#cast ⇒ Object
6 7 8 9 10 11 12 13 |
# File 'lib/rails-settings-ui/value_types/boolean.rb', line 6 def cast case value when 'off' self.value = false else self.value = true end end |