diff --git a/lib/rdoc/generator/darkfish.rb b/lib/rdoc/generator/darkfish.rb
index 45795eb78e..b843ce8db6 100644
--- a/lib/rdoc/generator/darkfish.rb
+++ b/lib/rdoc/generator/darkfish.rb
@@ -128,16 +128,6 @@ class RDoc::Generator::Darkfish
attr_reader :json_index
- ##
- # Methods to be displayed by this generator
-
- attr_reader :methods
-
- ##
- # Sorted list of classes and modules to be displayed by this generator
-
- attr_reader :modsort
-
##
# The RDoc::Store that is the source of the generated content
@@ -170,8 +160,6 @@ def initialize store, options
@classes = nil
@context = nil
@files = nil
- @methods = nil
- @modsort = nil
@json_index = RDoc::Generator::JsonIndex.new self, options
end
@@ -287,16 +275,6 @@ def copy_static
end
end
- ##
- # Return a list of the documented modules sorted by salience first, then
- # by name.
-
- def get_sorted_module_list classes
- classes.select do |klass|
- klass.display?
- end.sort
- end
-
##
# Generate an index page which lists all the classes which are documented.
@@ -308,22 +286,15 @@ def generate_index
out_file = @base_dir + @options.op_dir + 'index.html'
rel_prefix = @outputdir.relative_path_from out_file.dirname
- search_index_rel_prefix = rel_prefix
- search_index_rel_prefix += @asset_rel_path if @file_output
-
- asset_rel_prefix = rel_prefix + @asset_rel_path
@title = @options.title
@main_page = @files.find { |f| f.full_name == @options.main_page }
- render_template template_file, out_file do |io|
- here = binding
- # suppress 1.9.3 warning
- here.local_variable_set(:asset_rel_prefix, asset_rel_prefix)
- # some partials rely on the presence of current variable to render
- here.local_variable_set(:current, @main_page) if @main_page
- here
- end
+ render_template template_file, out_file: out_file, locals: {
+ rel_prefix: rel_prefix,
+ asset_rel_prefix: rel_prefix + @asset_rel_path,
+ target: @main_page,
+ }
rescue => e
error = RDoc::Error.new \
"error generating index.html: #{e.message} (#{e.class})"
@@ -336,30 +307,37 @@ def generate_index
# Generates a class file for +klass+
def generate_class klass, template_file = nil
- current = klass
+ target = klass
template_file ||= @template_dir + 'class.rhtml'
debug_msg " working on %s (%s)" % [klass.full_name, klass.path]
out_file = @outputdir + klass.path
rel_prefix = @outputdir.relative_path_from out_file.dirname
- search_index_rel_prefix = rel_prefix
- search_index_rel_prefix += @asset_rel_path if @file_output
- asset_rel_prefix = rel_prefix + @asset_rel_path
-
- breadcrumb = # used in templates
- breadcrumb = generate_nesting_namespaces_breadcrumb(current, rel_prefix)
+ breadcrumb = generate_nesting_namespaces_breadcrumb(target, rel_prefix)
@title = "#{klass.type} #{klass.full_name} - #{@options.title}"
+ klass_class_methods = klass.class_method_list.sort
+ klass_instance_methods = klass.instance_methods.sort
+ klass_extends = klass.extends
+ klass_includes = klass.includes
+ klass_sections = klass.sort_sections
+
debug_msg " rendering #{out_file}"
- render_template template_file, out_file do |io|
- here = binding
- # suppress 1.9.3 warning
- here.local_variable_set(:asset_rel_prefix, asset_rel_prefix)
- here
- end
+ render_template template_file, out_file: out_file, locals: {
+ asset_rel_prefix: rel_prefix + @asset_rel_path,
+ rel_prefix: rel_prefix,
+ target: target,
+ klass: klass,
+ breadcrumb: breadcrumb,
+ klass_class_methods: klass_class_methods,
+ klass_instance_methods: klass_instance_methods,
+ klass_extends: klass_extends,
+ klass_includes: klass_includes,
+ klass_sections: klass_sections,
+ }
end
##
@@ -372,16 +350,16 @@ def generate_class_files
return unless template_file.exist?
debug_msg "Generating class documentation in #{@outputdir}"
- current = nil
+ target = nil
@classes.each do |klass|
- current = klass
+ target = klass
generate_class klass, template_file
end
rescue => e
error = RDoc::Error.new \
- "error generating #{current.path}: #{e.message} (#{e.class})"
+ "error generating #{target.path}: #{e.message} (#{e.class})"
error.set_backtrace e.backtrace
raise error
@@ -404,10 +382,10 @@ def generate_file_files
debug_msg "Generating file documentation in #{@outputdir}"
out_file = nil
- current = nil
+ target = nil
@files.each do |file|
- current = file
+ target = file
if file.text? and page_file.exist? then
generate_page file
@@ -418,10 +396,6 @@ def generate_file_files
out_file = @outputdir + file.path
debug_msg " working on %s (%s)" % [file.full_name, out_file]
rel_prefix = @outputdir.relative_path_from out_file.dirname
- search_index_rel_prefix = rel_prefix
- search_index_rel_prefix += @asset_rel_path if @file_output
-
- asset_rel_prefix = rel_prefix + @asset_rel_path
unless filepage_file then
if file.text? then
@@ -438,13 +412,12 @@ def generate_file_files
@title += " - #{@options.title}"
template_file ||= filepage_file
- render_template template_file, out_file do |io|
- here = binding
- # suppress 1.9.3 warning
- here.local_variable_set(:asset_rel_prefix, asset_rel_prefix)
- here.local_variable_set(:current, current)
- here
- end
+ render_template template_file, out_file: out_file, locals: {
+ rel_prefix: rel_prefix,
+ asset_rel_prefix: rel_prefix + @asset_rel_path,
+ file: file,
+ target: target,
+ }
end
rescue => e
error =
@@ -463,22 +436,18 @@ def generate_page file
out_file = @outputdir + file.path
debug_msg " working on %s (%s)" % [file.full_name, out_file]
rel_prefix = @outputdir.relative_path_from out_file.dirname
- search_index_rel_prefix = rel_prefix
- search_index_rel_prefix += @asset_rel_path if @file_output
- current = file
- asset_rel_prefix = rel_prefix + @asset_rel_path
+ target = file
@title = "#{file.page_name} - #{@options.title}"
debug_msg " rendering #{out_file}"
- render_template template_file, out_file do |io|
- here = binding
- # suppress 1.9.3 warning
- here.local_variable_set(:current, current)
- here.local_variable_set(:asset_rel_prefix, asset_rel_prefix)
- here
- end
+ render_template template_file, out_file: out_file, locals: {
+ file: file,
+ target: target,
+ asset_rel_prefix: rel_prefix + @asset_rel_path,
+ rel_prefix: rel_prefix,
+ }
end
##
@@ -490,20 +459,13 @@ def generate_servlet_not_found message
debug_msg "Rendering the servlet 404 Not Found page..."
- rel_prefix = rel_prefix = ''
- search_index_rel_prefix = rel_prefix
- search_index_rel_prefix += @asset_rel_path if @file_output
-
- asset_rel_prefix = ''
-
@title = 'Not Found'
- render_template template_file do |io|
- here = binding
- # suppress 1.9.3 warning
- here.local_variable_set(:asset_rel_prefix, asset_rel_prefix)
- here
- end
+ render_template template_file, locals: {
+ asset_rel_prefix: '',
+ rel_prefix: '',
+ message: message
+ }
rescue => e
error = RDoc::Error.new \
"error generating servlet_not_found: #{e.message} (#{e.class})"
@@ -521,14 +483,13 @@ def generate_servlet_root installed
debug_msg 'Rendering the servlet root page...'
- rel_prefix = '.'
- asset_rel_prefix = rel_prefix
- search_index_rel_prefix = asset_rel_prefix
- search_index_rel_prefix += @asset_rel_path if @file_output
-
@title = 'Local RDoc Documentation'
- render_template template_file do |io| binding end
+ render_template template_file, locals: {
+ asset_rel_prefix: '.',
+ rel_prefix: '.',
+ installed: installed
+ }
rescue => e
error = RDoc::Error.new \
"error generating servlet_root: #{e.message} (#{e.class})"
@@ -548,19 +509,13 @@ def generate_table_of_contents
out_file = @outputdir + 'table_of_contents.html'
rel_prefix = @outputdir.relative_path_from out_file.dirname
- search_index_rel_prefix = rel_prefix
- search_index_rel_prefix += @asset_rel_path if @file_output
-
- asset_rel_prefix = rel_prefix + @asset_rel_path
@title = "Table of Contents - #{@options.title}"
- render_template template_file, out_file do |io|
- here = binding
- # suppress 1.9.3 warning
- here.local_variable_set(:asset_rel_prefix, asset_rel_prefix)
- here
- end
+ render_template template_file, out_file: out_file, locals: {
+ rel_prefix: rel_prefix,
+ asset_rel_prefix: rel_prefix + @asset_rel_path,
+ }
rescue => e
error = RDoc::Error.new \
"error generating table_of_contents.html: #{e.message} (#{e.class})"
@@ -598,8 +553,7 @@ def setup
@classes = @store.all_classes_and_modules.sort
@files = @store.all_files.sort
- @methods = @classes.flat_map { |m| m.method_list }.sort
- @modsort = get_sorted_module_list @classes
+ @page_files = @files.select { |f| f.text? }
end
##
@@ -647,26 +601,28 @@ def render file_name
#
# An io will be yielded which must be captured by binding in the caller.
- def render_template template_file, out_file = nil # :yield: io
+ def render_template template_file, out_file: nil, locals: {}
io_output = out_file && !@dry_run && @file_output
erb_klass = io_output ? RDoc::ERBIO : ERB
template = template_for template_file, true, erb_klass
+ @context = binding
+ locals.each do |key, value|
+ @context.local_variable_set(key, value)
+ end
+
if io_output then
debug_msg "Outputting to %s" % [out_file.expand_path]
out_file.dirname.mkpath
out_file.open 'w', 0644 do |io|
io.set_encoding @options.encoding
-
- @context = yield io
+ @context.local_variable_set(:io, io)
template_result template, @context, template_file
end
else
- @context = yield nil
-
output = template_result template, @context, template_file
debug_msg " would have written %d characters to %s" % [
@@ -737,6 +693,17 @@ def excerpt(comment)
extracted_text[0...150].gsub(/\n/, " ").squeeze(" ")
end
+ def generate_table_from_target(target)
+ return '' if target.nil?
+ comment =
+ if target.respond_to? :comment_location then
+ target.comment_location
+ else
+ target.comment
+ end
+ target.parse(comment).table_of_contents.dup
+ end
+
def generate_ancestor_list(ancestors, klass)
return '' if ancestors.empty?
@@ -757,7 +724,7 @@ def generate_ancestor_list(ancestors, klass)
def generate_class_link(klass, rel_prefix)
if klass.display?
- %(#{klass.name}
)
+ %(#{generate_sidebar_link(klass.name, klass.path, rel_prefix)}
)
else
%(#{klass.name}
)
end
@@ -767,25 +734,21 @@ def generate_class_index_content(classes, rel_prefix)
grouped_classes = group_classes_by_namespace_for_sidebar(classes)
return '' unless top = grouped_classes[nil]
- solo = top.one? { |klass| klass.display? }
- traverse_classes(top, grouped_classes, rel_prefix, solo)
+ open = top.one? { |klass| klass.display? }
+ traverse_classes(top, grouped_classes, rel_prefix, open)
end
- def traverse_classes(klasses, grouped_classes, rel_prefix, solo = false)
- content = +'
'
-
- klasses.each do |index_klass|
- if children = grouped_classes[index_klass.full_name]
- content << %(#{generate_class_link(index_klass, rel_prefix)}
)
- content << traverse_classes(children, grouped_classes, rel_prefix)
- content << ' '
- solo = false
- elsif index_klass.display?
- content << %(- #{generate_class_link(index_klass, rel_prefix)}
)
+ def traverse_classes(klasses, grouped_classes, rel_prefix, open)
+ traverse_tree(klasses) do |index_klass|
+ {
+ label: generate_class_link(index_klass, rel_prefix),
+ children: grouped_classes[index_klass.full_name],
+ display: index_klass.display?,
+ open: open
+ }.tap do
+ open = false
end
end
-
- "#{content}
"
end
def group_classes_by_namespace_for_sidebar(classes)
@@ -799,6 +762,45 @@ def group_classes_by_namespace_for_sidebar(classes)
grouped_classes
end
+ def generate_sidebar_link(name, path, rel_prefix)
+ name = CGI.escapeHTML(name)
+ path = CGI.escapeHTML(path)
+ %(#{name})
+ end
+
+ def generate_pages_index_content(page_files, rel_prefix, target)
+ return '' if page_files.empty?
+
+ dir = target&.full_name&.[](/\A[^\/]+(?=\/)/) || target&.page_name
+ grouped_files = page_files.group_by { |f| f.full_name[/\A[^\/]+(?=\/)/] || f.page_name }
+
+ traverse_tree(grouped_files) do |name, files|
+ f = files.shift
+ # If the group has only one file, we can just link to it
+ if files.empty?
+ { label: generate_sidebar_link(f.page_name, f.path, rel_prefix), display: true }
+ else
+ label =
+ # If the group has multiple files and the current file matches the group name
+ # the label should be a link to the current file
+ if name == f.page_name
+ generate_sidebar_link(f.page_name, f.path, rel_prefix)
+ # Otherwise, the label should be the group name
+ else
+ files.unshift(f)
+ h(name)
+ end
+ {
+ label: label,
+ children: files,
+ display: true,
+ open: dir == name,
+ child_renderer: ->(f) { { label: generate_sidebar_link(f.page_name, f.path, rel_prefix), display: true } }
+ }
+ end
+ end
+ end
+
private
def nesting_namespaces_to_class_modules klass
@@ -817,4 +819,27 @@ def generate_nesting_namespaces_breadcrumb klass, rel_prefix
{ name: namespace, path: path, self: klass.full_name == class_module&.full_name }
end
end
+
+ def traverse_tree(items, &block)
+ content = +''
+
+ items.each do |*args|
+ result = yield(*args)
+ next unless result[:display]
+
+ if result[:children]
+ content << %(#{result[:label]}
)
+ if result[:child_renderer]
+ content << traverse_tree(result[:children]) { |item| result[:child_renderer].call(item) }
+ else
+ content << traverse_tree(result[:children], &block)
+ end
+ content << ' '
+ else
+ content << %(- #{result[:label]}
)
+ end
+ end
+
+ "#{content}
"
+ end
end
diff --git a/lib/rdoc/generator/template/darkfish/_sidebar_extends.rhtml b/lib/rdoc/generator/template/darkfish/_sidebar_extends.rhtml
deleted file mode 100644
index 7602076c96..0000000000
--- a/lib/rdoc/generator/template/darkfish/_sidebar_extends.rhtml
+++ /dev/null
@@ -1,15 +0,0 @@
-<%- unless klass.extends.empty? then %>
-
-
Extended With Modules
-
-
- <%- klass.each_extend do |ext| -%>
- <%- unless String === ext.module then -%>
- - <%= ext.module.full_name %>
- <%- else -%>
-
- <%= ext.name %>
- <%- end -%>
- <%- end -%>
-
-
-<%- end -%>
diff --git a/lib/rdoc/generator/template/darkfish/_sidebar_includes.rhtml b/lib/rdoc/generator/template/darkfish/_sidebar_includes.rhtml
deleted file mode 100644
index 5b600e5975..0000000000
--- a/lib/rdoc/generator/template/darkfish/_sidebar_includes.rhtml
+++ /dev/null
@@ -1,15 +0,0 @@
-<%- unless klass.includes.empty? then %>
-
-
Included Modules
-
-
- <%- klass.each_include do |inc| -%>
- <%- unless String === inc.module then -%>
- - <%= inc.module.full_name %>
- <%- else -%>
-
- <%= inc.name %>
- <%- end -%>
- <%- end -%>
-
-
-<%- end -%>
diff --git a/lib/rdoc/generator/template/darkfish/_sidebar_methods.rhtml b/lib/rdoc/generator/template/darkfish/_sidebar_methods.rhtml
deleted file mode 100644
index d09216a0f6..0000000000
--- a/lib/rdoc/generator/template/darkfish/_sidebar_methods.rhtml
+++ /dev/null
@@ -1,21 +0,0 @@
-<% if (class_methods = klass.class_method_list.sort).any? %>
-
-
Class Methods
-
- <%- class_methods.each do |meth| -%>
- - class="calls-super" <%- end %>><%= h meth.name -%>
- <%- end -%>
-
-
-<% end %>
-
-<% if (instance_methods = klass.instance_methods.sort).any? %>
-
-
Instance Methods
-
- <%- instance_methods.each do |meth| -%>
- - class="calls-super" <%- end %>><%= h meth.name -%>
- <%- end -%>
-
-
-<% end %>
diff --git a/lib/rdoc/generator/template/darkfish/_sidebar_pages.rhtml b/lib/rdoc/generator/template/darkfish/_sidebar_pages.rhtml
index 3f68f0c0dc..a6b82c84e5 100644
--- a/lib/rdoc/generator/template/darkfish/_sidebar_pages.rhtml
+++ b/lib/rdoc/generator/template/darkfish/_sidebar_pages.rhtml
@@ -1,32 +1,7 @@
-<%- simple_files = @files.select { |f| f.text? } %>
-<%- if defined?(current) -%>
- <%- dir = current.full_name[%r{\A[^/]+(?=/)}] || current.page_name -%>
-<%- end -%>
-<%- unless simple_files.empty? then -%>
+<%- if @page_files.any? -%>
Pages
-
- <%- simple_files.group_by do |f| -%>
- <%- f.full_name[%r{\A[^/]+(?=/)}] || f.page_name -%>
- <%- end.each do |n, files| -%>
- <%- f = files.shift -%>
- <%- if files.empty? -%>
- - <%= h f.page_name %>
- <%- next -%>
- <%- end -%>
-
open<% end %>><%
- if n == f.page_name
- %><%= h n %><%
- else
- %><%= h n %><% files.unshift(f)
- end %>
-
- <%- end -%>
-
+ <%= generate_pages_index_content(@page_files, rel_prefix, target) %>
<%- end -%>
diff --git a/lib/rdoc/generator/template/darkfish/_sidebar_parent.rhtml b/lib/rdoc/generator/template/darkfish/_sidebar_parent.rhtml
deleted file mode 100644
index 6808b2bf87..0000000000
--- a/lib/rdoc/generator/template/darkfish/_sidebar_parent.rhtml
+++ /dev/null
@@ -1,6 +0,0 @@
-<%- if klass.type == 'class' && (ancestors = klass.super_classes).any? -%>
-
-
Ancestors
- <%= generate_ancestor_list(ancestors, klass) %>
-
-<%- end -%>
diff --git a/lib/rdoc/generator/template/darkfish/_sidebar_sections.rhtml b/lib/rdoc/generator/template/darkfish/_sidebar_sections.rhtml
deleted file mode 100644
index 6dcd2ae81f..0000000000
--- a/lib/rdoc/generator/template/darkfish/_sidebar_sections.rhtml
+++ /dev/null
@@ -1,11 +0,0 @@
-<%- unless klass.sections.length == 1 then %>
-
-<%- end -%>
diff --git a/lib/rdoc/generator/template/darkfish/_sidebar_table_of_contents.rhtml b/lib/rdoc/generator/template/darkfish/_sidebar_table_of_contents.rhtml
index b1e047b5f7..f500e45bd3 100644
--- a/lib/rdoc/generator/template/darkfish/_sidebar_table_of_contents.rhtml
+++ b/lib/rdoc/generator/template/darkfish/_sidebar_table_of_contents.rhtml
@@ -1,16 +1,10 @@
-<%- comment = if current.respond_to? :comment_location then
- current.comment_location
- else
- current.comment
- end
- table = current.parse(comment).table_of_contents.dup
-
- if table.length > 1 then %>
+<%- table = generate_table_from_target(target) -%>
+<%- if table.length > 1 %>
Table of Contents
<%- display_link = proc do |heading| -%>
-
<%= heading.plain_html %>
+
<%= heading.plain_html %>
<%- end -%>
<%- list_siblings = proc do -%>
diff --git a/lib/rdoc/generator/template/darkfish/class.rhtml b/lib/rdoc/generator/template/darkfish/class.rhtml
index 628945d886..2c6b4238fa 100644
--- a/lib/rdoc/generator/template/darkfish/class.rhtml
+++ b/lib/rdoc/generator/template/darkfish/class.rhtml
@@ -8,11 +8,79 @@
<%= render '_sidebar_table_of_contents.rhtml' %>
- <%= render '_sidebar_sections.rhtml' %>
- <%= render '_sidebar_parent.rhtml' %>
- <%= render '_sidebar_includes.rhtml' %>
- <%= render '_sidebar_extends.rhtml' %>
- <%= render '_sidebar_methods.rhtml' %>
+
+ <%- if klass_sections.any? %>
+
+ <%- end -%>
+
+ <%- if klass.type == 'class' && (ancestors = klass.super_classes).any? -%>
+
+
Ancestors
+ <%= generate_ancestor_list(ancestors, klass) %>
+
+ <%- end -%>
+
+ <%- if klass_includes.any? %>
+
+
Included Modules
+
+
+ <%- klass_includes.each do |inc| -%>
+ <%- unless String === inc.module -%>
+ - <%= inc.module.full_name %>
+ <%- else -%>
+
- <%= inc.name %>
+ <%- end -%>
+ <%- end -%>
+
+
+ <%- end -%>
+
+ <%- if klass_extends.any? %>
+
+
Extended With Modules
+
+
+ <%- klass_extends.each do |ext| -%>
+ <%- unless String === ext.module -%>
+ - <%= ext.module.full_name %>
+ <%- else -%>
+
- <%= ext.name %>
+ <%- end -%>
+ <%- end -%>
+
+
+ <%- end -%>
+
+ <% if klass_class_methods.any? %>
+
+
Class Methods
+
+ <%- klass_class_methods.each do |meth| -%>
+ - class="calls-super" <%- end %>><%= h meth.name -%>
+ <%- end -%>
+
+
+ <% end %>
+
+ <% if klass_instance_methods.any? %>
+
+
Instance Methods
+
+ <%- klass_instance_methods.each do |meth| -%>
+ - class="calls-super" <%- end %>><%= h meth.name -%>
+ <%- end -%>
+
+
+ <% end %>
<%= render '_footer.rhtml' %>
diff --git a/lib/rdoc/generator/template/darkfish/index.rhtml b/lib/rdoc/generator/template/darkfish/index.rhtml
index beaab9570f..e7545cb36e 100644
--- a/lib/rdoc/generator/template/darkfish/index.rhtml
+++ b/lib/rdoc/generator/template/darkfish/index.rhtml
@@ -7,7 +7,7 @@
<%= render '_sidebar_search.rhtml' %>
- <%= render '_sidebar_table_of_contents.rhtml' if defined?(current) %>
+ <%= render '_sidebar_table_of_contents.rhtml' %>
<%= render '_sidebar_pages.rhtml' %>
<%= render '_sidebar_classes.rhtml' %>
diff --git a/lib/rdoc/generator/template/darkfish/table_of_contents.rhtml b/lib/rdoc/generator/template/darkfish/table_of_contents.rhtml
index 2cd2207836..a6017d810a 100644
--- a/lib/rdoc/generator/template/darkfish/table_of_contents.rhtml
+++ b/lib/rdoc/generator/template/darkfish/table_of_contents.rhtml
@@ -13,11 +13,10 @@
<%= h @title %>
-<%- simple_files = @files.select { |f| f.text? } -%>
-<%- unless simple_files.empty? then -%>
+<%- if @page_files.any? -%>
Pages
-<%- simple_files.sort.each do |file| -%>
+<%- @page_files.sort.each do |file| -%>
-
<%= h file.page_name %>
<%
@@ -37,7 +36,7 @@
Classes and Modules
-<%- @modsort.each do |klass| -%>
+<%- @classes.select(&:display?).each do |klass| -%>
-
<%= klass.full_name %>
<%- table = []
@@ -58,9 +57,7 @@
Methods
-<%- @store.all_classes_and_modules.flat_map do |mod|
- mod.method_list
- end.sort.each do |method| %>
+<%- @classes.flat_map(&:method_list).sort.each do |method| %>
-
<%= h method.pretty_name %>
—
diff --git a/test/rdoc/test_rdoc_generator_darkfish.rb b/test/rdoc/test_rdoc_generator_darkfish.rb
index ed84543ee1..a465b6f6c9 100644
--- a/test/rdoc/test_rdoc_generator_darkfish.rb
+++ b/test/rdoc/test_rdoc_generator_darkfish.rb
@@ -300,8 +300,6 @@ def test_setup
assert_equal [@klass_alias, @ignored, @klass, @object],
@g.classes.sort_by { |klass| klass.full_name }
assert_equal [@top_level], @g.files
- assert_equal [@meth, @meth, @meth_bang, @meth_bang, @meth_with_html_tag_yield, @meth_with_html_tag_yield], @g.methods
- assert_equal [@klass_alias, @klass, @object], @g.modsort
end
def test_template_for