seekingalpha / sphinxcontrib-rubydomain

A Sphinx extension for Ruby support

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ruby Domain

Author: SHIBUKAWA Yoshiki <yoshiki at shibu.jp>

About

This is the Ruby domain for Sphinx 1.0. Sphinx 1.0 will deliver new feature -- Domain. It will enable other language support except Python and C language.

This extension provides directives and roles to write Ruby documents.

Ruby Domain supports following objects:

  • Global Variable
  • Constant
  • Module
    • Function
    • Method(for Mix-In)
  • Class
    • Method
    • Class Method
    • Attribute

Note

This domain expresses methods and attribute names like this:

Module#method_name
Class#method_name
Class#attribute_name

And other items(module function and class method) are expressed like this:

Module.function_name
Class.class_method_name

Take care separator charactors!

URLs

PyPI:http://pypi.python.org/pypi/sphinxcontrib-rubydomain
Detail Document:http://packages.python.org/sphinxcontrib-rubydomain

Quick Sample

This is source:

.. rb:module:: DRb

.. rb:class:: DRbObject

   Object wrapping a reference to a remote drb object.

   Method calls on this object are relayed to the remote object that this object is a stub for.

   .. rb:classmethod:: new(obj[, uri=nil])

      Create a new remote object stub.

      obj is the (local) object we want to create a stub for. Normally this is nil.
      uri is the URI of the remote object that this will be a stub for.

   .. rb:classmethod:: new_with_uri(uri)

      Create a new DRbObject from a URI alone.

   .. rb:method:: method_missing(msg_id, *a, &b)

      Routes method calls to the referenced object.

Result:


.. rb:module:: DRb

.. rb:class:: DRbObject

    Object wrapping a reference to a remote drb object.

    Method calls on this object are relayed to the remote object that this object is a stub for.

    .. rb:classmethod:: new(obj[, uri=nil])

       Create a new remote object stub.

       obj is the (local) object we want to create a stub for. Normally this is nil.
       uri is the URI of the remote object that this will be a stub for.

    .. rb:classmethod:: new_with_uri(uri)

       Create a new DRbObject from a URI alone.

    .. rb:method:: method_missing(msg_id, *a, &b)

       Routes method calls to the referenced object.


From other place, you can create cross reference like that:

If you want to connect other node, use :rb:meth:`DRb::DRbObject.new_with_uri` and get front object.

Result:


If you want to connect other node, use :rb:meth:`DRb::DRbObject.new_with_uri` and get front object.


Install

easy_install -U sphinxcontrib-rubydomain

About

A Sphinx extension for Ruby support

License:Other


Languages

Language:Python 79.5%Language:Makefile 10.9%Language:Batchfile 9.7%