1
0
Fork 0
mirror of https://github.com/ruby-opencv/ruby-opencv synced 2023-03-27 23:22:12 -04:00

fix some codes for YARD 0.8

This commit is contained in:
ser1zw 2012-05-31 02:38:41 +09:00
parent c9c7975cf0
commit 9f890573db
17 changed files with 276 additions and 266 deletions

View file

@ -24,25 +24,6 @@ rb_module()
return module;
}
void
define_ruby_module()
{
if (module)
return;
/*
* opencv = rb_define_module("OpenCV");
*
* note: this comment is used by rdoc.
*/
VALUE opencv = rb_module_opencv();
module = rb_define_module_under(opencv, "Curve");
rb_define_method(module, "closed?", RUBY_METHOD_FUNC(rb_closed_q), 0);
rb_define_method(module, "convex?", RUBY_METHOD_FUNC(rb_convex_q), 0);
rb_define_method(module, "hole?", RUBY_METHOD_FUNC(rb_hole_q), 0);
rb_define_method(module, "simple?", RUBY_METHOD_FUNC(rb_simple_q), 0);
rb_define_method(module, "arc_length", RUBY_METHOD_FUNC(rb_arc_length), -1);
}
/*
* If the curve is closed, return true. Otherwise return false.
* @overload closed?
@ -121,6 +102,26 @@ rb_arc_length(int argc, VALUE *argv, VALUE self)
return rb_float_new(length);
}
void
init_ruby_module()
{
#if 0
// For documentation using YARD
VALUE opencv = rb_define_module("OpenCV");
#endif
if (module)
return;
VALUE opencv = rb_module_opencv();
module = rb_define_module_under(opencv, "Curve");
rb_define_method(module, "closed?", RUBY_METHOD_FUNC(rb_closed_q), 0);
rb_define_method(module, "convex?", RUBY_METHOD_FUNC(rb_convex_q), 0);
rb_define_method(module, "hole?", RUBY_METHOD_FUNC(rb_hole_q), 0);
rb_define_method(module, "simple?", RUBY_METHOD_FUNC(rb_simple_q), 0);
rb_define_method(module, "arc_length", RUBY_METHOD_FUNC(rb_arc_length), -1);
}
__NAMESPACE_END_CURVE
__NAMESPACE_END_OPENCV