summaryrefslogtreecommitdiffhomepage
path: root/lib/yard/mruby/handlers/source/base.rb
diff options
context:
space:
mode:
authorSeba Gamboa <[email protected]>2015-09-23 11:42:28 -0300
committerSeba Gamboa <[email protected]>2015-09-23 11:42:37 -0300
commit731c5326b47b34364b2a8f69c6d558f52957a562 (patch)
tree213d83fe80cd4ab7922e5e0879d3bcbd01db9a8a /lib/yard/mruby/handlers/source/base.rb
parenta88dcf7f44898495fd2d2535ec0c4508a4458c38 (diff)
downloadyard-mruby-731c5326b47b34364b2a8f69c6d558f52957a562.tar.gz
yard-mruby-731c5326b47b34364b2a8f69c6d558f52957a562.zip
Detecting classes and methods from C sources
Diffstat (limited to 'lib/yard/mruby/handlers/source/base.rb')
-rw-r--r--lib/yard/mruby/handlers/source/base.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/yard/mruby/handlers/source/base.rb b/lib/yard/mruby/handlers/source/base.rb
new file mode 100644
index 0000000..4578079
--- /dev/null
+++ b/lib/yard/mruby/handlers/source/base.rb
@@ -0,0 +1,18 @@
+module YARD
+ module MRuby
+ module Handlers
+ module Source
+ class Base < YARD::Handlers::C::Base
+ DEFAULT_NAMESPACES = {
+ 'mrb->object_class' => 'Object'
+ }
+
+ def namespace_for_variable(var)
+ return DEFAULT_NAMESPACES[var] if DEFAULT_NAMESPACES[var]
+ super
+ end
+ end
+ end
+ end
+ end
+end