Permalink
Browse files

Ref/NilClass: Write reference page for NilClass.

  • Loading branch information...
1 parent 2a3b66a commit 5987de4d5e58d68de0f85a16babb18503e495364 @runpaint committed Jan 18, 2011
Showing with 31 additions and 0 deletions.
  1. +1 −0 book.xml
  2. +30 −0 src/ref/nilclass.xml
View
@@ -73,6 +73,7 @@
<xi:include href="src/ref/method.xml"/>
<xi:include href="src/ref/module.xml"/>
<xi:include href="src/ref/mutex.xml"/>
+ <xi:include href="src/ref/nilclass.xml"/>
</part>
<xi:include href="src/bibliography.xml"/>
View
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<appendix version="5.0"
+ xml:id="ref.nilclass" xml:lang="en" xmlns="http://docbook.org/ns/docbook"
+ xmlns:xi="http://www.w3.org/2001/XInclude"
+ xmlns:xlink="http://www.w3.org/1999/xlink">
+
+ <title>NilClass</title>
+
+ <para><methodsynopsis><type>false</type><methodname>NilClass#&amp;</methodname><methodparam><parameter>object</parameter></methodparam></methodsynopsis> Performs a logical AND between the receiver and <parameter>object</parameter>.</para>
+
+ <para><methodsynopsis><type>true or false</type><methodname>NilClass#^</methodname><methodparam><parameter>object</parameter></methodparam></methodsynopsis> Performs an exclusive OR between the receiver and <parameter>object</parameter>: returns <literal>false</literal> if <parameter>object</parameter> is <literal>false</literal> or <literal>nil</literal>; otherwise, <literal>true</literal>.</para>
+
+ <para><methodsynopsis><type>true or false</type><methodname>NilClass#|</methodname><methodparam><parameter>object</parameter></methodparam></methodsynopsis> Performs a logical OR between the receiver and <parameter>object</parameter>: returns <literal>false</literal> if <parameter>object</parameter> is <literal>false</literal> or <literal>nil</literal>; otherwise, <literal>true</literal>.</para>
+
+ <para><methodsynopsis><type>true</type><methodname>NilClass#nil?</methodname><void/></methodsynopsis> Returns <literal>true</literal>.</para>
+
+ <para><methodsynopsis><type>Rational</type><methodname>NilClass#rationalize</methodname><void/></methodsynopsis> Returns a new <literal>Rational</literal> object whose numerator is <literal>0</literal>, and denominator is <literal>1</literal>.</para>
+
+ <para><methodsynopsis><type>Array</type><methodname>NilClass#to_a</methodname><void/></methodsynopsis> Returns <literal>[]</literal>.</para>
+
+ <para><methodsynopsis><type>Complex</type><methodname>NilClass#to_c</methodname><void/></methodsynopsis> Returns a new <literal>Complex</literal> object whose real part and imaginary part are both <literal>0</literal>.</para>
+
+ <para><methodsynopsis><type>Float</type><methodname>NilClass#to_f</methodname><void/></methodsynopsis> Returns <literal>0.0</literal>.</para>
+
+ <para><methodsynopsis><type>Integer</type><methodname>NilClass#to_i</methodname><void/></methodsynopsis> Returns <literal>0</literal>.</para>
+
+ <para><methodsynopsis><type>Rational</type><methodname>NilClass#to_r</methodname><void/></methodsynopsis> Returns a new <literal>Rational</literal> object whose numerator is <literal>0</literal>, and denominator is <literal>1</literal>.</para>
+
+ <para><methodsynopsis><type>String</type><methodname>NilClass#to_s</methodname><void/></methodsynopsis> Returns <literal>""</literal>.</para>
+</appendix>

0 comments on commit 5987de4

Please sign in to comment.