method
method_missing
v1_8_7_72 -
Show latest stable
- Class:
WIN32OLE
method_missing(...)public
Calls WIN32OLE#invoke method.
/*
* call-seq:
* WIN32OLE#method_missing(id [,arg1, arg2, ...])
*
* Calls WIN32OLE#invoke method.
*/
static VALUE
fole_missing(argc, argv, self)
int argc;
VALUE *argv;
VALUE self;
{
ID id;
char* mname;
int n;
id = rb_to_id(argv[0]);
mname = rb_id2name(id);
if(!mname) {
rb_raise(rb_eRuntimeError, "fail: unknown method or property");
}
n = strlen(mname);
if(mname[n-1] == '=') {
argv[0] = rb_str_new(mname, n-1);
return ole_propertyput(self, argv[0], argv[1]);
}
else {
argv[0] = rb_str_new2(mname);
return ole_invoke(argc, argv, self, DISPATCH_METHOD|DISPATCH_PROPERTYGET);
}
} Related methods
- Instance methods
- []
- []=
- _getproperty
- _invoke
- _setproperty
- each
- invoke
- method_missing
- ole_activex_initialize
- ole_free
- ole_func_methods
- ole_get_methods
- ole_method
- ole_method_help
- ole_methods
- ole_obj_help
- ole_put_methods
- setproperty
- Class methods
- codepage
- codepage=
- connect
- const_load
- new
- ole_free
- ole_reference_count
- ole_show_help