Module: LedgerSync::ResourceAttribute::DirtyMixin::ClassMethods

Defined in:
lib/ledger_sync/resource_attribute/dirty_mixin.rb

Instance Method Summary collapse

Instance Method Details

#dirty_attributesObject

define_method(“#name=”) do |val|

      send("#{name}_will_change!") unless val == instance_variable_get("@#{name}")
      instance_variable_set("@#{name}", val)
    end
  end
end

end



31
32
33
# File 'lib/ledger_sync/resource_attribute/dirty_mixin.rb', line 31

def dirty_attributes
  @dirty_attributes ||= {}
end