require 'fedux_org/stdlib/logic_converters/exceptions' module FeduxOrg module Stdlib module LogicConverters class TrueFalseConverter # @param [true,false] value # the logic value which should be converted # @return [String] # the converted value: true => 'true', false => 'false', '' => nil def parse( value ) case value when true 'true' when false 'false' when '' nil else raise FeduxOrg::Stdlib::LogicConverters::Exceptions::InvalidValue, "Unknown logic value \"#{value}\"." end end end end end end