Module: Primalize::Single::Type

Included in:
All, Enum, Float, Integer, Match, Number, Optional, Primalizer, String, Timestamp
Defined in:
lib/primalize/single.rb

Overview

TYPES

Constant Summary collapse

DEFAULT_COERCION =

Don’t coerce by default

proc { |arg| arg }

Instance Method Summary collapse

Instance Method Details

#coerce(*args) ⇒ Object



157
158
159
# File 'lib/primalize/single.rb', line 157

def coerce *args
  (@coercion || DEFAULT_COERCION).call(*args)
end