module Attrio::Reset::ClassMethods
Public Instance Methods
define_attrio_reset(as)
click to toggle source
# File lib/attrio/reset.rb, line 10 def define_attrio_reset(as) define_method "reset_#{as.to_s}" do |attributes = []| self.send(as.to_s, attributes).values.each{ |attribute| attribute.reset! } end end