static public Method

Precision.included(p1)

call_seq:

included

When the Precision module is mixed-in to a class, this included method is used to add our default induced_from implementation to the host class.

Source Code

/*
* call_seq:
*   included
*
* When the +Precision+ module is mixed-in to a class, this +included+
* method is used to add our default +induced_from+ implementation
* to the host class.
*/

static VALUE
prec_included(module, include)
   VALUE module, include;
{
   switch (TYPE(include)) {
     case T_CLASS:
     case T_MODULE:
      break;
     default:
      Check_Type(include, T_CLASS);
      break;
   }
   rb_define_singleton_method(include, "induced_from", prec_induced_from, 1);
   return module;
}
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.