lib/active_type/virtual_attributes.rb
def build_dirty_tracking_methods(name)
        return if name.to_s == 'attribute' # clashes with internal methods

        @module.module_eval <<-BODY, __FILE__, __LINE__ + 1
          def #{name}_was
            virtual_attributes_were["#{name}"]
          end
        BODY

        @module.module_eval <<-BODY, __FILE__, __LINE__ + 1
          def #{name}_changed?
            #{name} != virtual_attributes_were["#{name}"]
          end
        BODY

        @module.module_eval <<-BODY, __FILE__, __LINE__ + 1
          def #{name}_will_change!
            # no-op
          end
        BODY
      end
# Methods for compatibility with gems expecting the ActiveModel::Dirty API.
Methods for compatibility with gems expecting the ActiveModel::Dirty API.
Methods for compatibility with gems expecting the ActiveModel :: Dirty API .
def build_dirty_tracking_methods(name)
        return if name.to_s == 'attribute' 
        @module.module_eval <<-BODY, __FILE__, __LINE__ + 1
          def #{name}_was
            virtual_attributes_were["#{name}"]
          end
        BODY
        @module.module_eval <<-BODY, __FILE__, __LINE__ + 1
          def #{name}_changed?
            #{name} != virtual_attributes_were["#{name}"]
          end
        BODY
        @module.module_eval <<-BODY, __FILE__, __LINE__ + 1
          def #{name}_will_change!
            # no-op
          end
        BODY
      end
def build_dirty_tracking_methods ( name ) return if name . to_s == 'attribute' @module . module_eval <<-BODY , __FILE__ , __LINE__ + 1 
          def  #{ name } _was
            virtual_attributes_were[" #{ name } "]
          end
         BODY @module . module_eval <<-BODY , __FILE__ , __LINE__ + 1 
          def  #{ name } _changed?
             #{ name }  != virtual_attributes_were[" #{ name } "]
          end
         BODY @module . module_eval <<-BODY , __FILE__ , __LINE__ + 1 
          def  #{ name } _will_change!
            # no-op
          end
         BODY end
Methods for compatibility with gems expecting the ActiveModel::Dirty API.
Methods for compatibility with gems expecting the ActiveModel :: Dirty API .
# clashes with internal methods
name