lib/couchrest/mixins/callbacks.rb
def _define_runner(symbol)
        body = send("_#{symbol}_callback").
          compile(nil, :terminator => send("_#{symbol}_terminator"))

        body, line = <<-RUBY_EVAL, __LINE__ + 1
          def _run_#{symbol}_callbacks(key = nil, &blk)
            if key
              name = "_run__\#{self.class.name.hash.abs}__#{symbol}__\#{key.hash.abs}__callbacks"

              unless respond_to?(name)
                self.class._create_keyed_callback(name, :#{symbol}, self, &blk)
              end

              send(name, &blk)
            else
              #{body}
            end
          end
        RUBY_EVAL

        undef_method "_run_#{symbol}_callbacks" if method_defined?("_run_#{symbol}_callbacks")
        class_eval body, __FILE__, line
      end
# Make the _run_save_callbacks method. The generated method takes
# a block that it'll yield to. It'll call the before and around filters
# in order, yield the block, and then run the after filters.
# 
# _run_save_callbacks do
#   save
# end
#
# The _run_save_callbacks method can optionally take a key, which
# will be used to compile an optimized callback method for each
# key. See #define_callbacks for more information.
Make the _run_save_callbacks method. The generated method takes
a block that it'll yield to. It'll call the before and around filters
in order, yield the block, and then run the after filters.

_run_save_callbacks do
save
end

The _run_save_callbacks method can optionally take a key, which
will be used to compile an optimized callback method for each
key. See #define_callbacks for more information.
Make the _run_save_callbacks method . The generated method takes a block that it ' ll yield to . It ' ll call the before and around filters in order yield the block and then run the after filters . _run_save_callbacks do save end The _run_save_callbacks method can optionally take a key which will be used to compile an optimized callback method for each key . See #define_callbacks for more information .
def _define_runner(symbol)
        body = send("_#{symbol}_callback").
          compile(nil, :terminator => send("_#{symbol}_terminator"))
        body, line = <<-RUBY_EVAL, __LINE__ + 1
          def _run_#{symbol}_callbacks(key = nil, &blk)
            if key
              name = "_run__\#{self.class.name.hash.abs}__#{symbol}__\#{key.hash.abs}__callbacks"
              unless respond_to?(name)
                self.class._create_keyed_callback(name, :#{symbol}, self, &blk)
              end
              send(name, &blk)
            else
              #{body}
            end
          end
        RUBY_EVAL
        undef_method "_run_#{symbol}_callbacks" if method_defined?("_run_#{symbol}_callbacks")
        class_eval body, __FILE__, line
      end
def _define_runner ( symbol ) body = send ( "_#{symbol}_callback" ) . compile ( nil , :terminator => send ( "_#{symbol}_terminator" ) ) body , line = <<-RUBY_EVAL , __LINE__ + 1 
          def _run_ #{ symbol } _callbacks(key = nil, &blk)
            if key
              name = "_run__ \# {self.class.name.hash.abs}__ #{ symbol } __ \# {key.hash.abs}__callbacks"

              unless respond_to?(name)
                self.class._create_keyed_callback(name, : #{ symbol } , self, &blk)
              end

              send(name, &blk)
            else
               #{ body } 
            end
          end
         RUBY_EVAL undef_method "_run_#{symbol}_callbacks" if method_defined? ( "_run_#{symbol}_callbacks" ) class_eval body , __FILE__ , line end
Make the _run_save_callbacks method.
Make the _run_save_callbacks method .
symbol