Sha256: 12cf7276d9d20004b8ab5ea1406dd3e233b343bb2c1d055c0ae065eaaa3f8eea
Contents?: true
Size: 291 Bytes
Versions: 19
Compression:
Stored size: 291 Bytes
Contents
module Vedeu module Collection extend self def coercer(value, model, key) return [] if value.nil? || value.empty? if value.is_a?(::String) [model.new({ key => value })] else [value].flatten.map { |v| model.new(v) } end end end end
Version data entries
19 entries across 19 versions & 1 rubygems