From 0dc342de848a642ecce8db697b8fecd83a63e117 Mon Sep 17 00:00:00 2001 From: yugui Date: Mon, 25 Aug 2008 15:02:05 +0000 Subject: added tag v1_9_0_4 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/tags/v1_9_0_4@18845 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- trunk/lib/rdoc/generator/html/one_page_html.rb | 121 +++++++++++++++++++++++++ 1 file changed, 121 insertions(+) create mode 100644 trunk/lib/rdoc/generator/html/one_page_html.rb (limited to 'trunk/lib/rdoc/generator/html/one_page_html.rb') diff --git a/trunk/lib/rdoc/generator/html/one_page_html.rb b/trunk/lib/rdoc/generator/html/one_page_html.rb new file mode 100644 index 0000000000..c4dd95529d --- /dev/null +++ b/trunk/lib/rdoc/generator/html/one_page_html.rb @@ -0,0 +1,121 @@ +require 'rdoc/generator/html' + +module RDoc::Generator::HTML::ONE_PAGE_HTML + + CONTENTS_XML = <<-EOF +<% if defined? classes and classes["description"] then %> +<%= classes["description"] %> +<% end %> + +<% if defined? files and files["requires"] then %> +

Requires:

+ +<% end %> + +<% if defined? classes and classes["includes"] then %> +

Includes

+ +<% end %> + +<% if defined? classes and classes["sections"] then %> +<% classes["sections"].each do |sections| %> +<% if sections["attributes"] then %> +

Attributes

+ +<% sections["attributes"].each do |attributes| %> + +<% end %><%# sections["attributes"] %> +
<%= attributes["name"] %><%= attributes["rw"] %><%= attributes["a_desc"] %>
+<% end %> + +<% if sections["method_list"] then %> +

Methods

+<% sections["method_list"].each do |method_list| %> +<% if method_list["methods"] then %> +<% method_list["methods"].each do |methods| %> +

<%= methods["type"] %> <%= methods["category"] %> method: +<% if methods["callseq"] then %> +"><%= methods["callseq"] %> +<% end %> +<% unless methods["callseq"] then %> +"><%= methods["name"] %><%= methods["params"] %>

+<% end %> + +<% if methods["m_desc"] then %> +<%= methods["m_desc"] %> +<% end %> + +<% if methods["sourcecode"] then %> +
+<%= methods["sourcecode"] %>
+
+<% end %> +<% end %><%# method_list["methods"] %> +<% end %> +<% end %><%# sections["method_list"] %> +<% end %> +<% end %><%# classes["sections"] %> +<% end %> + EOF + + ONE_PAGE = %{ + + + + <%= values["title"] %> + " /> + + +<% values["files"].each do |files| %> +

File: <%= files["short_name"] %>

+ + + +
Path:<%= files["full_path"] %>
Modified:<%= files["dtm_modified"] %>
+} + CONTENTS_XML + %{ +<% end %><%# values["files"] %> + +<% if values["classes"] then %> +

Classes

+<% values["classes"].each do |classes| %> +<% if classes["parent"] then %> +

<%= classes["classmod"] %> <%= classes["full_name"] %> < <%= href classes["par_url"], classes["parent"] %>

+<% end %> +<% unless classes["parent"] then %> +

<%= classes["classmod"] %> <%= classes["full_name"] %>

+<% end %> + +<% if classes["infiles"] then %> +(in files +<% classes["infiles"].each do |infiles| %> +<%= href infiles["full_path_url"], infiles["full_path"] %> +<% end %><%# classes["infiles"] %> +) +<% end %> +} + CONTENTS_XML + %{ +<% end %><%# values["classes"] %> +<% end %> + + +} + +end + -- cgit v1.2.3