owner()
public
Returns the class or module that defines the method.
Show source
static VALUE
method_owner(VALUE obj)
{
struct METHOD *data;
VALUE defined_class;
TypedData_Get_Struct(obj, struct METHOD, &method_data_type, data);
defined_class = data->defined_class;
if (RB_TYPE_P(defined_class, T_ICLASS)) {
defined_class = RBASIC_CLASS(defined_class);
}
return defined_class;
}