Class: ParamsReady::Value::NonEmptyStringCoder

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

Class Method Summary collapse

Methods inherited from StringCoder

format

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

.coerce(value, _) ⇒ Object



47
48
49
50
51
# File 'lib/params_ready/value/custom.rb', line 47

def self.coerce(value, _)
  return Extensions::Undefined if value.nil? || value.empty?

  super
end