lib/uses_stored_procedures.rb
# Define the class and instance methods. Note the need to
# create a singleton class instance to create the stored
# procedure class method.
Define the class and instance methods. Note the need to
create a singleton class instance to create the stored
procedure class method.
Define the class and instance methods . Note the need to create a singleton class instance to create the stored procedure class method .
def install_stored_proc_methods(name, proc_name, call_stored_proc_verb, filter) 
      define_method name do |*args| 
        self.class.exec_stored_proc(proc_name, call_stored_proc_verb, filter, args) 
      end
      singleton_class = class << self; self; end
      singleton_class.send(:define_method, name) do |*args| 
        exec_stored_proc(proc_name, call_stored_proc_verb, filter, args) 
      end
    end
def install_stored_proc_methods ( name , proc_name , call_stored_proc_verb , filter ) define_method name do | * args | self . class . exec_stored_proc ( proc_name , call_stored_proc_verb , filter , args ) end singleton_class = class << self ; self ; end singleton_class . send ( :define_method , name ) do | * args | exec_stored_proc ( proc_name , call_stored_proc_verb , filter , args ) end end
Define the class and instance methods.
Define the class and instance methods .
#:nodoc:
name
<not_specific>
proc_name
<not_specific>
call_stored_proc_verb
<not_specific>
filter
<not_specific>