Sha256: 473848343d482662e8bebf3daaa908b29b5ef6df682f54e47790e8c0e8403cac

Contents?: true

Size: 515 Bytes

Versions: 14

Compression:

Stored size: 515 Bytes

Contents

module DataMapper
  module Resource
    def adjust(attributes = {}, reload = false)
      collection_for_self.adjust(*args)
    end

    def adjust!(*args)
      collection_for_self.adjust!(*args)
    end

    private

    def adjust_attributes(attributes)
      adjust_attributes = {}

      model.properties(repository.name).values_at(*attributes.keys).each do |property|
        adjust_attributes[property] = attributes[property.name]
      end

      adjust_attributes
    end
  end # Resource
end # DataMapper

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
dm-adjust-1.2.0 lib/dm-adjust/resource.rb
dm-adjust-1.2.0.rc2 lib/dm-adjust/resource.rb
dm-adjust-1.2.0.rc1 lib/dm-adjust/resource.rb
dm-adjust-1.1.0 lib/dm-adjust/resource.rb
dm-adjust-1.1.0.rc3 lib/dm-adjust/resource.rb
dm-adjust-1.1.0.rc2 lib/dm-adjust/resource.rb
dm-adjust-1.1.0.rc1 lib/dm-adjust/resource.rb
dm-adjust-1.0.2 lib/dm-adjust/resource.rb
dm-adjust-1.0.1 lib/dm-adjust/resource.rb
dm-adjust-1.0.0 lib/dm-adjust/resource.rb
dm-adjust-1.0.0.rc3 lib/dm-adjust/resource.rb
dm-adjust-1.0.0.rc2 lib/dm-adjust/resource.rb
dm-adjust-1.0.0.rc1 lib/dm-adjust/resource.rb
dm-adjust-0.10.2 lib/dm-adjust/resource.rb