Sha256: e77ac948364302f02698422405ed2b0817158bf02557925e879fccdee44cfc47
Contents?: true
Size: 417 Bytes
Versions: 8
Compression:
Stored size: 417 Bytes
Contents
module Predicates module Conversions def as_string simple_transform(:as_string, -> (v) { v.to_s } ) end def as_int simple_transform(:as_int, -> (v) { Type.responds(v, :to_i); v.to_i } ) end def as_float simple_transform(:as_float, -> (v) { Type.responds(v, :to_f); v.to_f } ) end def as_array simple_transform(:as_array, -> (v) { [v] } ) end end end
Version data entries
8 entries across 8 versions & 1 rubygems