ext/hand_rank/hand_rank.c
void Init_hand_rank( void ){

  rb_load_lut();

  VALUE cHandRank = rb_const_get(rb_cObject, rb_intern("HandRank"));

  rb_define_singleton_method( cHandRank, "rank", rb_rank, 1 );
  rb_define_singleton_method( cHandRank, "category", rb_category, 1 );
  rb_define_singleton_method( cHandRank, "rank_in_category", rb_rank_in_category, 1 );
  rb_define_singleton_method( cHandRank, "category_key", rb_category_key, 1 );
  rb_define_singleton_method( cHandRank, "explain", rb_explain, 1 );
}
/******************************************************************************/
/*  This is the "magical" setup function, the main entry point, that is       */
/*  responsible for exporting our C function to the Ruby context.             */
/******************************************************************************/
This is the "magical" setup function, the main entry point, that is
responsible for exporting our C function to the Ruby context.
This is the " magical " setup function the main entry point that is responsible for exporting our C function to the Ruby context .
void Init_hand_rank( void ){
  rb_load_lut();
  VALUE cHandRank = rb_const_get(rb_cObject, rb_intern("HandRank"));
  rb_define_singleton_method( cHandRank, "rank", rb_rank, 1 );
  rb_define_singleton_method( cHandRank, "category", rb_category, 1 );
  rb_define_singleton_method( cHandRank, "rank_in_category", rb_rank_in_category, 1 );
  rb_define_singleton_method( cHandRank, "category_key", rb_category_key, 1 );
  rb_define_singleton_method( cHandRank, "explain", rb_explain, 1 );
}
void Init_hand_rank ( void ) { rb_load_lut ( ) ; VALUE cHandRank = rb_const_get ( rb_cObject , rb_intern ( " " ) ) ; rb_define_singleton_method ( cHandRank , " " , rb_rank , 1 ) ; rb_define_singleton_method ( cHandRank , " " , rb_category , 1 ) ; rb_define_singleton_method ( cHandRank , " " , rb_rank_in_category , 1 ) ; rb_define_singleton_method ( cHandRank , " " , rb_category_key , 1 ) ; rb_define_singleton_method ( cHandRank , " " , rb_explain , 1 ) ; }
This is the "magical" setup function, the main entry point, that is
responsible for exporting our C function to the Ruby context.
This is the " magical " setup function the main entry point that is responsible for exporting our C function to the Ruby context .