Method: Puppet_X::EnterpriseModules::WebLogic::Types::NumberedBoolean::ClassMethods#coerce
- Defined in:
- lib/puppet_x/enterprisemodules/weblogic/types.rb
#coerce(value) ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/puppet_x/enterprisemodules/weblogic/types.rb', line 22 def coerce(value) case value when 'True', 1, '1' 1 when 'False', 0, '0', '', nil 0 when 'absent', :absent value else fail "Value '#{value}' not regognised as a numbered boolean.'" end end |