Class: ParamsReady::Value::CheckboxBooleanCoder

Inherits:
BooleanCoder show all
Defined in:
lib/params_ready/value/custom.rb

Class Method Summary collapse

Methods inherited from BooleanCoder

coerce

Methods inherited from Coder

instance

Methods included from Coercion

#strict_default?, #try_coerce

Methods inherited from AbstractCoder

value_class_name

Methods included from Extensions::ClassReaderWriter

#class_reader_writer

Class Method Details

.format(value, format) ⇒ Object



38
39
40
41
# File 'lib/params_ready/value/custom.rb', line 38

def self.format(value, format)
  return value unless format.marshal? :boolean
  return value ? 'true' : nil
end