Sha256: b33afb9584b76cc7d4451b80b88f6e1170f688d86757ceabfb4520020cd39e8b
Contents?: true
Size: 326 Bytes
Versions: 14
Compression:
Stored size: 326 Bytes
Contents
module Type class ArrayOfConditionsType < ActiveModel::Type::Value CONDITION_KEYS = KB::Condition.attribute_types.keys.map(&:to_sym) def cast(value) (value || []).map do |v| next v if v.is_a? KB::Condition KB::Condition.new v.symbolize_keys.slice(*CONDITION_KEYS) end end end end
Version data entries
14 entries across 14 versions & 1 rubygems