method

increment

increment(attribute, by = 1)
public

Initializes the attribute to zero if nil and adds the value passed as by (default is one). Only makes sense for number-based attributes. Returns self.