module Pupper::TrackableAttributes::InstanceMethods
Public Instance Methods
attributes()
click to toggle source
# File lib/pupper/trackable_attributes.rb, line 13 def attributes @attributes ||= {} end
new_changes()
click to toggle source
# File lib/pupper/trackable_attributes.rb, line 17 def new_changes changes.transform_values(&:last) end
refresh(**attrs)
click to toggle source
# File lib/pupper/trackable_attributes.rb, line 29 def refresh(**attrs) assign_attributes(**attrs) changes_applied end
reload!()
click to toggle source
# File lib/pupper/trackable_attributes.rb, line 21 def reload! restore_attributes end
rollback!()
click to toggle source
# File lib/pupper/trackable_attributes.rb, line 25 def rollback! restore_attributes end