<!DOCTYPE html>

<html> <head> <meta content=“text/html; charset=UTF-8” http-equiv=“Content-Type”>

<title>class ReVIEW::Book::ChapterIndex - review-2.1.0 Documentation</title>

<link type=“text/css” media=“screen” href=“../../rdoc.css” rel=“stylesheet”>

<script type=“text/javascript”>

var rdoc_rel_prefix = "../../";

</script>

<script type=“text/javascript” charset=“utf-8” src=“../../js/jquery.js”></script> <script type=“text/javascript” charset=“utf-8” src=“../../js/navigation.js”></script> <script type=“text/javascript” charset=“utf-8” src=“../../js/search_index.js”></script> <script type=“text/javascript” charset=“utf-8” src=“../../js/search.js”></script> <script type=“text/javascript” charset=“utf-8” src=“../../js/searcher.js”></script> <script type=“text/javascript” charset=“utf-8” src=“../../js/darkfish.js”></script>

<body id=“top” class=“class”> <nav id=“metadata”>

<nav id="home-section" class="section">
<h3 class="section-header">
  <a href="../../index.html">Home</a>
  <a href="../../table_of_contents.html#classes">Classes</a>
  <a href="../../table_of_contents.html#methods">Methods</a>
</h3>

</nav>

<nav id="search-section" class="section project-section" class="initially-hidden">
<form action="#" method="get" accept-charset="utf-8">
  <h3 class="section-header">
    <input type="text" name="search" placeholder="Search" id="search-field"
           title="Type to search, Up and Down to navigate, Enter to load">
  </h3>
</form>

<ul id="search-results" class="initially-hidden"></ul>

</nav>

<div id="file-metadata">
  <nav id="file-list-section" class="section">
<h3 class="section-header">Defined In</h3>
<ul>
  <li>lib/review/book/index.rb
</ul>

</nav>

</div>

<div id="class-metadata">

  <nav id="parent-class-section" class="section">
<h3 class="section-header">Parent</h3>

<p class="link"><a href="Index.html">ReVIEW::Book::Index</a>

</nav>

<!-- Method Quickref -->

<nav id=“method-list-section” class=“section”>

<h3 class="section-header">Methods</h3>

<ul class="link-list">

  <li ><a href="#method-i-display_string">#display_string</a>

  <li ><a href="#method-i-item_type">#item_type</a>

  <li ><a href="#method-i-number">#number</a>

  <li ><a href="#method-i-title">#title</a>

</ul>

</nav>

</div>

<div id="project-metadata">
  <nav id="fileindex-section" class="section project-section">
<h3 class="section-header">Pages</h3>

<ul>

  <li class="file"><a href="../../ChangeLog.html">ChangeLog</a>

</ul>

</nav>

  <nav id="classindex-section" class="section project-section">
<h3 class="section-header">Class and Module Index</h3>

<ul class="link-list">

  <li><a href="../../EPUBMaker.html">EPUBMaker</a>

  <li><a href="../../EPUBMaker/Content.html">EPUBMaker::Content</a>

  <li><a href="../../EPUBMaker/EPUBCommon.html">EPUBMaker::EPUBCommon</a>

  <li><a href="../../EPUBMaker/EPUBv2.html">EPUBMaker::EPUBv2</a>

  <li><a href="../../EPUBMaker/EPUBv3.html">EPUBMaker::EPUBv3</a>

  <li><a href="../../EPUBMaker/Producer.html">EPUBMaker::Producer</a>

  <li><a href="../../Encoding.html">Encoding</a>

  <li><a href="../../Hash.html">Hash</a>

  <li><a href="../../LineInput.html">LineInput</a>

  <li><a href="../../Object.html">Object</a>

  <li><a href="../../ReVIEW.html">ReVIEW</a>

  <li><a href="../../ReVIEW/ApplicationError.html">ReVIEW::ApplicationError</a>

  <li><a href="../../ReVIEW/Book.html">ReVIEW::Book</a>

  <li><a href="../../ReVIEW/Book/Base.html">ReVIEW::Book::Base</a>

  <li><a href="../../ReVIEW/Book/BibpaperIndex.html">ReVIEW::Book::BibpaperIndex</a>

  <li><a href="../../ReVIEW/Book/Chapter.html">ReVIEW::Book::Chapter</a>

  <li><a href="../../ReVIEW/Book/ChapterIndex.html">ReVIEW::Book::ChapterIndex</a>

  <li><a href="../../ReVIEW/Book/ColumnIndex.html">ReVIEW::Book::ColumnIndex</a>

  <li><a href="../../ReVIEW/Book/Compilable.html">ReVIEW::Book::Compilable</a>

  <li><a href="../../ReVIEW/Book/FootnoteIndex.html">ReVIEW::Book::FootnoteIndex</a>

  <li><a href="../../ReVIEW/Book/HeadlineIndex.html">ReVIEW::Book::HeadlineIndex</a>

  <li><a href="../../ReVIEW/Book/IconIndex.html">ReVIEW::Book::IconIndex</a>

  <li><a href="../../ReVIEW/Book/ImageFinder.html">ReVIEW::Book::ImageFinder</a>

  <li><a href="../../ReVIEW/Book/ImageIndex.html">ReVIEW::Book::ImageIndex</a>

  <li><a href="../../ReVIEW/Book/ImageIndex/Item.html">ReVIEW::Book::ImageIndex::Item</a>

  <li><a href="../../ReVIEW/Book/IndepImageIndex.html">ReVIEW::Book::IndepImageIndex</a>

  <li><a href="../../ReVIEW/Book/IndepImageIndex/Item.html">ReVIEW::Book::IndepImageIndex::Item</a>

  <li><a href="../../ReVIEW/Book/Index.html">ReVIEW::Book::Index</a>

  <li><a href="../../ReVIEW/Book/ListIndex.html">ReVIEW::Book::ListIndex</a>

  <li><a href="../../ReVIEW/Book/NumberlessImageIndex.html">ReVIEW::Book::NumberlessImageIndex</a>

  <li><a href="../../ReVIEW/Book/NumberlessImageIndex/Item.html">ReVIEW::Book::NumberlessImageIndex::Item</a>

  <li><a href="../../ReVIEW/Book/PageMetric.html">ReVIEW::Book::PageMetric</a>

  <li><a href="../../ReVIEW/Book/Part.html">ReVIEW::Book::Part</a>

  <li><a href="../../ReVIEW/Book/TableIndex.html">ReVIEW::Book::TableIndex</a>

  <li><a href="../../ReVIEW/Book/Volume.html">ReVIEW::Book::Volume</a>

  <li><a href="../../ReVIEW/Builder.html">ReVIEW::Builder</a>

  <li><a href="../../ReVIEW/Catalog.html">ReVIEW::Catalog</a>

  <li><a href="../../ReVIEW/CompileError.html">ReVIEW::CompileError</a>

  <li><a href="../../ReVIEW/Compiler.html">ReVIEW::Compiler</a>

  <li><a href="../../ReVIEW/Compiler/InlineSyntaxElement.html">ReVIEW::Compiler::InlineSyntaxElement</a>

  <li><a href="../../ReVIEW/Compiler/SyntaxElement.html">ReVIEW::Compiler::SyntaxElement</a>

  <li><a href="../../ReVIEW/ConfigError.html">ReVIEW::ConfigError</a>

  <li><a href="../../ReVIEW/Configure.html">ReVIEW::Configure</a>

  <li><a href="../../ReVIEW/Converter.html">ReVIEW::Converter</a>

  <li><a href="../../ReVIEW/EPUBBuilder.html">ReVIEW::EPUBBuilder</a>

  <li><a href="../../ReVIEW/EPUBMaker.html">ReVIEW::EPUBMaker</a>

  <li><a href="../../ReVIEW/EPUBMaker/ReVIEWHeaderListener.html">ReVIEW::EPUBMaker::ReVIEWHeaderListener</a>

  <li><a href="../../ReVIEW/EWBBuilder.html">ReVIEW::EWBBuilder</a>

  <li><a href="../../ReVIEW/Error.html">ReVIEW::Error</a>

  <li><a href="../../ReVIEW/ErrorUtils.html">ReVIEW::ErrorUtils</a>

  <li><a href="../../ReVIEW/FileNotFound.html">ReVIEW::FileNotFound</a>

  <li><a href="../../ReVIEW/HTMLBuilder.html">ReVIEW::HTMLBuilder</a>

  <li><a href="../../ReVIEW/HTMLTOCPrinter.html">ReVIEW::HTMLTOCPrinter</a>

  <li><a href="../../ReVIEW/HTMLToc.html">ReVIEW::HTMLToc</a>

  <li><a href="../../ReVIEW/HTMLUtils.html">ReVIEW::HTMLUtils</a>

  <li><a href="../../ReVIEW/I18n.html">ReVIEW::I18n</a>

  <li><a href="../../ReVIEW/IDGXMLBuilder.html">ReVIEW::IDGXMLBuilder</a>

  <li><a href="../../ReVIEW/KeyError.html">ReVIEW::KeyError</a>

  <li><a href="../../ReVIEW/LATEXBuilder.html">ReVIEW::LATEXBuilder</a>

  <li><a href="../../ReVIEW/LaTeXIndex.html">ReVIEW::LaTeXIndex</a>

  <li><a href="../../ReVIEW/LaTeXUtils.html">ReVIEW::LaTeXUtils</a>

  <li><a href="../../ReVIEW/Line.html">ReVIEW::Line</a>

  <li><a href="../../ReVIEW/LineInput.html">ReVIEW::LineInput</a>

  <li><a href="../../ReVIEW/Location.html">ReVIEW::Location</a>

  <li><a href="../../ReVIEW/MARKDOWNBuilder.html">ReVIEW::MARKDOWNBuilder</a>

  <li><a href="../../ReVIEW/MD2INAOBuilder.html">ReVIEW::MD2INAOBuilder</a>

  <li><a href="../../ReVIEW/MakerHelper.html">ReVIEW::MakerHelper</a>

  <li><a href="../../ReVIEW/PDFMaker.html">ReVIEW::PDFMaker</a>

  <li><a href="../../ReVIEW/Preprocessor.html">ReVIEW::Preprocessor</a>

  <li><a href="../../ReVIEW/Preprocessor/Directive.html">ReVIEW::Preprocessor::Directive</a>

  <li><a href="../../ReVIEW/Preprocessor/Strip.html">ReVIEW::Preprocessor::Strip</a>

  <li><a href="../../ReVIEW/Repository.html">ReVIEW::Repository</a>

  <li><a href="../../ReVIEW/SecCounter.html">ReVIEW::SecCounter</a>

  <li><a href="../../ReVIEW/SyntaxError.html">ReVIEW::SyntaxError</a>

  <li><a href="../../ReVIEW/TEXTBuilder.html">ReVIEW::TEXTBuilder</a>

  <li><a href="../../ReVIEW/TOCParser.html">ReVIEW::TOCParser</a>

  <li><a href="../../ReVIEW/TOCParser/Chapter.html">ReVIEW::TOCParser::Chapter</a>

  <li><a href="../../ReVIEW/TOCParser/List.html">ReVIEW::TOCParser::List</a>

  <li><a href="../../ReVIEW/TOCParser/Node.html">ReVIEW::TOCParser::Node</a>

  <li><a href="../../ReVIEW/TOCParser/Paragraph.html">ReVIEW::TOCParser::Paragraph</a>

  <li><a href="../../ReVIEW/TOCParser/Section.html">ReVIEW::TOCParser::Section</a>

  <li><a href="../../ReVIEW/TOCPrinter.html">ReVIEW::TOCPrinter</a>

  <li><a href="../../ReVIEW/TOPBuilder.html">ReVIEW::TOPBuilder</a>

  <li><a href="../../ReVIEW/Template.html">ReVIEW::Template</a>

  <li><a href="../../ReVIEW/TextTOCPrinter.html">ReVIEW::TextTOCPrinter</a>

  <li><a href="../../ReVIEW/TextUtils.html">ReVIEW::TextUtils</a>

  <li><a href="../../ReVIEW/Unfold.html">ReVIEW::Unfold</a>

  <li><a href="../../ReVIEW/WEBMaker.html">ReVIEW::WEBMaker</a>

  <li><a href="../../ReVIEW/WEBTOCPrinter.html">ReVIEW::WEBTOCPrinter</a>

  <li><a href="../../ReVIEW/WrongInput.html">ReVIEW::WrongInput</a>

  <li><a href="../../ReVIEW/YAMLLoader.html">ReVIEW::YAMLLoader</a>

  <li><a href="../../String.html">String</a>

</ul>

</nav>

</div>

</nav>

<div id=“documentation”>

<h1 class="class">class ReVIEW::Book::ChapterIndex</h1>

<div id="description" class="description">

</div><!-- description -->

<section id="5Buntitled-5D" class="documentation-section">

  <!-- Methods -->

   <section id="public-instance-5Buntitled-5D-method-details" class="method-section section">
    <h3 class="section-header">Public Instance Methods</h3>

    <div id="method-i-display_string" class="method-detail ">

      <div class="method-heading">
        <span class="method-name">display_string</pan><span
          class="method-args">(id)</span>

        <span class="method-click-advice">click to toggle source</pan>

      </div>

      <div class="method-description">

        <div class="method-source-code" id="display_string-source">
          <pre><span class="ruby-comment"># File lib/review/book/index.rb, line 106</span>

<span class=“ruby-keyword”>def</span> <span class=“ruby-identifier”>display_string</span>(<span class=“ruby-identifier”>id</span>)

<span class="ruby-node">&quot;#{number(id)}#{I18n.t(&quot;chapter_quote&quot;, title(id))}&quot;</span>

<span class=“ruby-keyword”>end</span></pre>

    </div><!-- display_string-source -->

  </div>

</div><!-- display_string-method -->

<div id="method-i-item_type" class="method-detail ">

  <div class="method-heading">
    <span class="method-name">item_type</span><span
      class="method-args">()</span>

    <span class="method-click-advice">click to toggle source</span>

  </div>

  <div class="method-description">

    <div class="method-source-code" id="item_type-source">
      <pre><span class="ruby-comment"># File lib/review/book/index.rb, line 89</span>

<span class=“ruby-keyword”>def</span> <span class=“ruby-identifier”>item_type</span>

<span class="ruby-string">&#39;chapter&#39;</span>

<span class=“ruby-keyword”>end</span></pre>

    </div><!-- item_type-source -->

  </div>

</div><!-- item_type-method -->

<div id="method-i-number" class="method-detail ">

  <div class="method-heading">
    <span class="method-name">number</span><span
      class="method-args">(id)</span>

    <span class="method-click-advice">click to toggle source</span>

  </div>

  <div class="method-description">

    <div class="method-source-code" id="number-source">
      <pre><span class="ruby-comment"># File lib/review/book/index.rb, line 93</span>

<span class=“ruby-keyword”>def</span> <span class=“ruby-identifier”>number</span>(<span class=“ruby-identifier”>id</span>)

<span class="ruby-identifier">chapter</span> = <span class="ruby-ivar">@index</span>.<span class="ruby-identifier">fetch</span>(<span class="ruby-identifier">id</span>)
<span class="ruby-identifier">chapter</span>.<span class="ruby-identifier">format_number</span>

<span class=“ruby-keyword”>rescue</span> <span class=“ruby-comment”># part</span>

<span class="ruby-node">&quot;#{I18n.t(&quot;part&quot;, chapter.number)}&quot;</span>

<span class=“ruby-keyword”>end</span></pre>

    </div><!-- number-source -->

  </div>

</div><!-- number-method -->

<div id="method-i-title" class="method-detail ">

  <div class="method-heading">
    <span class="method-name">title</span><span
      class="method-args">(id)</span>

    <span class="method-click-advice">click to toggle source</span>

  </div>

  <div class="method-description">

    <div class="method-source-code" id="title-source">
      <pre><span class="ruby-comment"># File lib/review/book/index.rb, line 100</span>

<span class=“ruby-keyword”>def</span> <span class=“ruby-identifier”>title</span>(<span class=“ruby-identifier”>id</span>)

<span class="ruby-ivar">@index</span>.<span class="ruby-identifier">fetch</span>(<span class="ruby-identifier">id</span>).<span class="ruby-identifier">title</span>

<span class=“ruby-keyword”>rescue</span> <span class=“ruby-comment”># non-file part</span>

<span class="ruby-ivar">@index</span>.<span class="ruby-identifier">fetch</span>(<span class="ruby-identifier">id</span>).<span class="ruby-identifier">name</span>

<span class=“ruby-keyword”>end</span></pre>

        </div><!-- title-source -->

      </div>

    </div><!-- title-method -->

  </section><!-- public-instance-method-details -->

</section><!-- 5Buntitled-5D -->

</div><!– documentation –>

<footer id=“validator-badges”>

<p><a href="http://validator.w3.org/check/referer">[Validate]</a>
<p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 4.0.0.
<p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.

</footer>