Collection attribute handles enumerable-like types
Handles coercing members to the designated member type.
FIXME: temporary hack, remove when Axiom::Type works with EV as member_type
@api public
# File lib/virtus/attribute/collection.rb, line 73 def coerce(value) coerced = super return coerced unless coerced.respond_to?(:each_with_object) coerced.each_with_object(primitive.new) do |entry, collection| collection << member_type.coerce(entry) end end
Generated with the Darkfish Rdoc Generator 2.