Sha256: d9e46ae59c5cb97b797aacaf2b428b770e8d8b13dc2076e42f641ba448e673fb

Contents?: true

Size: 356 Bytes

Versions: 2

Compression:

Stored size: 356 Bytes

Contents

module DataMapper # :nodoc:
  class PropertySet # :nodoc:
    
    def []=(name, property)
      if existing_property = detect { |p| p.name == name }
        property.hash
        @entries[@entries.index(existing_property)] = property
      else
        add(property)
      end
      property
    end
    
  end # class PropertySet
end # module DataMapper

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
mack-data_mapper-0.7.0 lib/mack-data_mapper/dm_patches/property_set.rb
mack-data_mapper-0.7.0.1 lib/mack-data_mapper/dm_patches/property_set.rb