Sha256: 49168b1881cb023beae19183ea7ab6f56af1c0ea8a8d04e3fb84f089dac10823
Contents?: true
Size: 387 Bytes
Versions: 8
Compression:
Stored size: 387 Bytes
Contents
# frozen_string_literal: true module Praxis module Types class SplattableStringArray < Attributor::Collection # Make a type, to allow to load the value, as s single string, if it isn't a numerable # This way we can do displayable: 'foobar' , or displayable: ['one', 'two'] def self.decode_string(value, _context) Array(value) end end end end
Version data entries
8 entries across 8 versions & 1 rubygems