Sha256: a4d7a94f79627f82f50b1cda0b6a8d554385f2f076841f4cac5457d5428f1aff
Contents?: true
Size: 491 Bytes
Versions: 4
Compression:
Stored size: 491 Bytes
Contents
# typed: strict module Typed module Coercion class StringCoercer < Coercer extend T::Generic Target = type_member { {fixed: String} } sig { override.params(type: T::Class[T.anything]).returns(T::Boolean) } def used_for_type?(type) type == String end sig { override.params(field: Field, value: Value).returns(Result[Target, CoercionError]) } def coerce(field:, value:) Success.new(String(value)) end end end end
Version data entries
4 entries across 4 versions & 1 rubygems