Class: Type::ArrayOfConditionsType
- Inherits:
-
ActiveModel::Type::Value
- Object
- ActiveModel::Type::Value
- Type::ArrayOfConditionsType
- Defined in:
- lib/kb/type/array_of_conditions_type.rb
Constant Summary collapse
Instance Method Summary collapse
Instance Method Details
#cast(value) ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/kb/type/array_of_conditions_type.rb', line 5 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 |