Table Of Contents

Next topic

Reference

This Page

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!

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:


class DRb::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.

classmethod DRbObject.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.

classmethod DRbObject.new_with_uri(uri)

Create a new DRbObject from a URI alone.

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 DRb::DRbObject.new_with_uri and get front object.


ChangeLog

This file describes user-visible changes between the extension versions.

Version 0.1 (2010-08-04)

  • Initial version.

License

If not otherwise noted, the extensions in this package are licensed
under the following license.

Copyright (c) 2010 by the contributors (see AUTHORS file).
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

* Redistributions of source code must retain the above copyright
  notice, this list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright
  notice, this list of conditions and the following disclaimer in the
  documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.