Sha256: a1d30acd4cbe275fe419d48447e81a81b922b9f0dbc20e201c826875e13422c7
Contents?: true
Size: 706 Bytes
Versions: 6
Compression:
Stored size: 706 Bytes
Contents
module Gummi module Document module Attributes extend ActiveSupport::Concern module ClassMethods def mapping_for_attribute(attribute) if attribute.is_a? Virtus::Attribute::EmbeddedValue {properties: attribute.primitive.mapping} elsif attribute.is_a? Virtus::Attribute::Collection mapping_for_attribute(attribute.member_type) else attribute.mapping end end def mapping result = {} attribute_set.each do |attribute| result.merge!({ attribute.name => mapping_for_attribute(attribute)}) end result end end end end end
Version data entries
6 entries across 6 versions & 1 rubygems