Class: Generators::ContextUser

Class | Generators::ContextUser
In: | lib/generators/templates/application/merb_core/doc/rdoc/generators/merb_generator.rb lib/generators/templates/application/merb_stack/doc/rdoc/generators/merb_generator.rb
Parent: | Object

A Context is built by the parser to represent a container: contexts hold classes, modules, methods, require lists and include lists. ClassModule and TopLevel are the context objects we process here

### Methods

add_table_of_sections add_table_of_sections build_alias_summary_list build_alias_summary_list build_class_list build_class_list build_constants_summary_list build_constants_summary_list build_include_list build_include_list build_method_detail_list build_method_detail_list build_method_summary_list build_method_summary_list build_requires_list build_requires_list collect_methods collect_methods diagram_reference diagram_reference document_self document_self find_symbol find_symbol href href new new potentially_referenced_list potentially_referenced_list

### Included Modules

MarkUp MarkUp

### Attributes

context | [R] |
context | [R] |

### Public Class methods

new(context, options)
new(context, options)

### Public Instance methods

add_table_of_sections()

create table of contents if we contain sections

add_table_of_sections()

create table of contents if we contain sections

build_alias_summary_list(section)

Build a list of aliases for which we couldn‘t find a corresponding method

build_alias_summary_list(section)

Build a list of aliases for which we couldn‘t find a corresponding method

build_class_list(level, from, section, infile=nil)

Build the structured list of classes and modules contained in this context.

build_class_list(level, from, section, infile=nil)

Build the structured list of classes and modules contained in this context.

build_constants_summary_list(section)

Build a list of constants

build_constants_summary_list(section)

Build a list of constants

build_include_list(context)
build_include_list(context)
build_method_detail_list(section)

Build an array of arrays of method details. The outer array has up to six entries, public, private, and protected for both class methods, the other for instance methods. The inner arrays contain a hash for each method

build_method_detail_list(section)

Build an array of arrays of method details. The outer array has up to six entries, public, private, and protected for both class methods, the other for instance methods. The inner arrays contain a hash for each method

build_method_summary_list(path_prefix="")

Build a summary list of all the methods in this context

build_method_summary_list(path_prefix="")

Build a summary list of all the methods in this context

build_requires_list(context)
build_requires_list(context)
collect_methods()

Create a list of HtmlMethod objects for each method in the corresponding context object. If the @options.show_all variable is set (corresponding to the `—all` option, we include all methods, otherwise just the public ones.

collect_methods()

Create a list of HtmlMethod objects for each method in the corresponding context object. If the @options.show_all variable is set (corresponding to the `—all` option, we include all methods, otherwise just the public ones.

diagram_reference(diagram)
diagram_reference(diagram)
document_self()
document_self()
find_symbol(symbol, method=nil)

Find a symbol in ourselves or our parent

find_symbol(symbol, method=nil)

Find a symbol in ourselves or our parent

href(link, cls, name)

convenience method to build a hyperlink # Where‘s the DRY in this?? Put this in the template where it belongs

href(link, cls, name)

convenience method to build a hyperlink # Where‘s the DRY in this?? Put this in the template where it belongs

potentially_referenced_list(array) {|i.name| ...}

Build a list from an array of Htmlxxx items. Look up each in the AllReferences hash: if we find a corresponding entry, we generate a hyperlink to it, otherwise just output the name. However, some names potentially need massaging. For example, you may require a Ruby file without the .rb extension, but the file names we know about may have it. To deal with this, we pass in a block which performs the massaging, returning an array of alternative names to match

potentially_referenced_list(array) {|i.name| ...}

Build a list from an array of Htmlxxx items. Look up each in the AllReferences hash: if we find a corresponding entry, we generate a hyperlink to it, otherwise just output the name. However, some names potentially need massaging. For example, you may require a Ruby file without the .rb extension, but the file names we know about may have it. To deal with this, we pass in a block which performs the massaging, returning an array of alternative names to match

[Validate]