About getting the method's properties in treetable

About getting the method's properties in treetable

Hi:

I try to enclose treetable into my library, but there comes a problem about how to 
invoke each function in treetable individually. 
The main code snippet is as following:
  1.  $.fn.treetable = function(method) {
  2.     if (methods[method]) {
  3.       return methods[method].apply(this, Array.prototype.slice.call(arguments, 1));
  4.     } else if (typeof method === 'object' || !method) {
  5.       return methods.init.apply(this, arguments);
  6.     } else {
  7.       return $.error("Method " + method + " does not exist on jQuery.treetable");
  8.     }
  9.   };
And the main problems is it using methods[method] to map the options to individual function, 
but if I hope to use its all function in my library via the same way, it will be duplicated and 
verbose. Something like that:
  1. $.fn.myownfunction=function(options)
  2. {
  3.    this.treetable(options)
  4. }
Seems useful, but It means I can not add my own options in initial step. Otherwise, I need to do the same things like  
  1. $.fn.myownfunction=function(method)
  2. {
  3.    if (methods[method]) {
  4.       return methods[method].apply(this, Array.prototype.slice.call(arguments, 1));
  5.     } else if (typeof method === 'object' || !method) {
  6.       return methods.init.apply(this, arguments);
  7.     } else {
  8.       return $.error("Method " + method + " does not exist on jQuery.myownfunction");
  9.     }
  10. }

  11.  methods = {
  12.    init:function(options, force){
  13.    ....
  14.    ......
  15.    this.treetable(options, force);
  16.    } 
  17.    otherfunction:
  18.    .....   
  19.    ..............
  20.  }
A work around, but not effectively.   Is there any other good way to fix the subject? thanks a lot