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