I've been working on some ruby libraries with C extensions now. And I want to give users access to the irb#help
method, e.g:
> help("Array#empty?")
# Prints documentation for the method.
I've been using the same way to name functions as ruby core, and the same documentation pattern. However, irb always tell me that there is Nothing known about FastPolyline.decode.
Here's my method:
/*
* call-seq:
* FastPolylines.decode([[1,1]]) -> String
*
* Decodes a polyline.
*/
static VALUE
decode(int argc, VALUE *argv, VALUE self) {
I've tried naming the method various ways, such as rb_FastPolylines__decode
, rb_fast_polylines_decode
, rb_decode
. None worked..
I've been looking on internet, but couldn't find any convincing resource on How to document a ruby C extension. Do you have any inputs on this ?