Sha256: ee896ff701493f955f234297ee3759af2bf113f5b1b0fabe6ef40526902c9569
Contents?: true
Size: 625 Bytes
Versions: 19
Compression:
Stored size: 625 Bytes
Contents
# frozen_string_literal: true module Vedeu module Coercers # Provides the mechanism to convert a value into a # {Vedeu::Models::Row}. # # @api private # class Row < Vedeu::Coercers::Coercer # @return [Vedeu::Models::Row] def coerce if coerced? value elsif array?(value) klass.new(value.compact) elsif value.nil? klass.new else klass.new([value]) end end private # @return [Class] def klass Vedeu::Models::Row end end # Row end # Coercers end # Vedeu
Version data entries
19 entries across 19 versions & 1 rubygems