lib/couchrest/mixins/callbacks.rb
def _create_keyed_callback(name, kind, obj, &blk)
        @_keyed_callbacks ||= {}
        @_keyed_callbacks[name] ||= begin
          str = send("_#{kind}_callback").
            compile(name, :object => obj, :terminator => send("_#{kind}_terminator"))

          class_eval "def #{name}() #{str} end", __FILE__, __LINE__

          true
        end
      end
# This is called the first time a callback is called with a particular
# key. It creates a new callback method for the key, calculating
# which callbacks can be omitted because of per_key conditions.
This is called the first time a callback is called with a particular
key. It creates a new callback method for the key, calculating
which callbacks can be omitted because of per_key conditions.
This is called the first time a callback is called with a particular key . It creates a new callback method for the key calculating which callbacks can be omitted because of per_key conditions .
def _create_keyed_callback(name, kind, obj, &blk)
        @_keyed_callbacks ||= {}
        @_keyed_callbacks[name] ||= begin
          str = send("_#{kind}_callback").
            compile(name, :object => obj, :terminator => send("_#{kind}_terminator"))
          class_eval "def #{name}() #{str} end", __FILE__, __LINE__
          true
        end
      end
def _create_keyed_callback ( name , kind , obj , & blk ) @_keyed_callbacks ||= { } @_keyed_callbacks [ name ] ||= begin str = send ( "_#{kind}_callback" ) . compile ( name , :object => obj , :terminator => send ( "_#{kind}_terminator" ) ) class_eval "def #{name}() #{str} end" , __FILE__ , __LINE__ true end end
This is called the first time a callback is called with a particular
key.
This is called the first time a callback is called with a particular key .
name
kind
obj
blk