Project

dm-adjust

0.01
Repository is archived
No commit activity in last 3 years
No release in over 3 years
DataMapper plugin providing methods to increment and decrement properties
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.6.4
~> 0.9.2
~> 1.3.2

Runtime

~> 1.2.0
 Project Readme

dm-adjust

¶ ↑

DataMapper plugin providing methods to increment and decrement properties

It provides the following function (for collections and resources):

adjust!¶ ↑

Person.adjust!(:salary => 1000) # increases the salary of all people with 1000.
Person.all(:age.gte => 40).adjust!(:salary => 2000) # increase salary of them oldies.
@child.adjust!(:allowance => -100) # less money for candy and concerts