Class: RDoc::Generator::Emerald::DummyStartPage

Inherits:
Struct
  • Object
show all
Defined in:
lib/rdoc/generator/emerald.rb

Overview

Minimal RDoc::Toplevel-alike object (i.e. it responds to the two methods required for rendering it, full_name and description) that is used to create the index page if none was set. I really recommend to manually set a useful index page!

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeDummyStartPage

Returns a new instance of DummyStartPage.



58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# File 'lib/rdoc/generator/emerald.rb', line 58

def initialize
  super()
  self.full_name = "Start page"
  self.description =<<-DESC
<h1>RDoc documentation</h1>
<p>This is a dummy start page for the RDoc documentation of this project.</p>
<p>You’re seeing it, because the original author didn’t specify a real start
   page for this project’s documentation, so you may want to contact him and
   make him aware of this.</p>
<p>If you <em>are</em> the original author, try one or both of the following
   code snippets to make your <strong>README.rdoc</strong> file the start
   page of your documentation:</p>
<pre>
# In your gemspec:
Gem::Specification.new do |spec|
  # ...
  # "-m" sets the start ("main") page. "-t" specifies
  # the title to display in the window title bar.
  spec.rdoc_options << "-m" << "README.rdoc" << "-t" "Docs for YourProject"
end

# In your Rakefile:
RDoc::Task.new do |rt|
  # ...
  # Sets the start ("main") page and specifies the
  # title to display in the window title bar:
  rt.main = "README.rdoc"
  rt.title = "Docs for YourProject"
end
</pre>
<p>For the time being, use the navigation sidebar to the left
   in order to read this documentation.</p>
  DESC
end

Instance Attribute Details

#descriptionObject

Returns the value of attribute description

Returns:

  • (Object)

    the current value of description



57
58
59
# File 'lib/rdoc/generator/emerald.rb', line 57

def description
  @description
end

#full_nameObject

Returns the value of attribute full_name

Returns:

  • (Object)

    the current value of full_name



57
58
59
# File 'lib/rdoc/generator/emerald.rb', line 57

def full_name
  @full_name
end