diff options
| author | Seba Gamboa <[email protected]> | 2015-09-23 14:24:03 -0300 |
|---|---|---|
| committer | Seba Gamboa <[email protected]> | 2015-09-23 14:24:03 -0300 |
| commit | aed91b0fb2fe3c2cd3a74e2e5bc23c8bd95ef1db (patch) | |
| tree | 880d0eb2d6ec5d949f4a0ae72980687dd9041740 /lib/yard/handlers/c/mruby_method_handler.rb | |
| parent | 731c5326b47b34364b2a8f69c6d558f52957a562 (diff) | |
| download | yard-mruby-aed91b0fb2fe3c2cd3a74e2e5bc23c8bd95ef1db.tar.gz yard-mruby-aed91b0fb2fe3c2cd3a74e2e5bc23c8bd95ef1db.zip | |
Making specs works
Diffstat (limited to 'lib/yard/handlers/c/mruby_method_handler.rb')
| -rw-r--r-- | lib/yard/handlers/c/mruby_method_handler.rb | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/yard/handlers/c/mruby_method_handler.rb b/lib/yard/handlers/c/mruby_method_handler.rb new file mode 100644 index 0000000..01fb345 --- /dev/null +++ b/lib/yard/handlers/c/mruby_method_handler.rb @@ -0,0 +1,21 @@ +module YARD::Handlers::C + class MRubyMethodHandler < MRubyBase + MATCH1 = /mrb_define_method\s* + \( + \s*\w+\s*, + \s*(\w+)\s*, + \s*"(\w+)"\s*, + \s*(\w+)\s*, + /mx + + handles MATCH1 + statement_class BodyStatement + + process do + statement.source.scan(MATCH1) do |var_name, name, func_name| + handle_method(nil, var_name, name, func_name) + end + end + + end +end |
