Class: RDoc::NormalClass
| Relationships & Source Files | |
| Super Chains via Extension / Inclusion / Inheritance | |
| Class Chain: | |
| Instance Chain: | |
| Inherits: | RDoc::ClassModule 
 | 
| Defined in: | lib/rdoc/code_object/normal_class.rb | 
Overview
A normal class, neither singleton nor anonymous
Constant Summary
Text - Included
  MARKUP_FORMAT, SPACE_SEPARATED_LETTER_CLASS, TO_HTML_CHARACTERS
Context - Inherited
  TOMDOC_TITLES, TOMDOC_TITLES_SORT, TYPES
ClassModule - Inherited
  
Class Method Summary
ClassModule - Inherited
| .from_module | Return a  | 
| .new | Creates a new  | 
Context - Inherited
| .new | Creates an unnamed empty context with public current visibility. | 
CodeObject - Inherited
| .new | Creates a new  | 
Instance Attribute Summary
ClassModule - Inherited
| #comment_location | 
 | 
| #constant_aliases | Constants that are aliases for this class or module. | 
| #documented? | Does this class or module have a comment with content or is  | 
| #is_alias_for | Class or module this constant is an alias for. | 
| #module? | Does this object represent a module? | 
| #name= | Allows overriding the initial name. | 
| #store= | Sets the store for this class or module and its contained code objects. | 
| #superclass | Get the superclass of this class. | 
| #superclass= | Set the superclass of this class to  | 
| #comment= | This method is deprecated, use  | 
Context - Inherited
| #aliases | Class/module aliases. | 
| #attributes | All attr* methods. | 
| #block_params | Block params to be used in the next  | 
| #constants | Constants defined. | 
| #constants_hash | Hash of registered constants. | 
| #current_line_visibility= | Current visibility of this line. | 
| #current_section | The current documentation section that new items will be added to. | 
| #current_section= | Sets the current documentation section of documentation. | 
| #extends | Modules this context is extended with. | 
| #external_aliases | Aliases that could not be resolved. | 
| #fully_documented? | Does this context and its methods and constants all have documentation? | 
| #in_files | Files this context is found in. | 
| #includes | Modules this context includes. | 
| #method_list | Methods defined in this context. | 
| #methods_hash | Hash of registered methods. | 
| #name | Name of this class excluding namespace. | 
| #ongoing_visibility= | Changes the visibility for new methods to  | 
| #params | Params to be used in the next  | 
| #remove_from_documentation? | Should we remove this context from the documentation? | 
| #requires | Files this context requires. | 
| #temporary_section | Use this section for the next method, attribute or constant added. | 
| #unmatched_alias_lists | Hash  | 
| #visibility | Current visibility of this context. | 
CodeObject - Inherited
| #comment | Our comment. | 
| #comment= | Replaces our comment with  | 
| #display? | Should this  | 
| #document_children | Do we document our children? | 
| #document_children= | Enables or disables documentation of this CodeObject’s children unless it has been turned off by :enddoc: | 
| #document_self | Do we document ourselves? | 
| #document_self= | Enables or disables documentation of this  | 
| #documented? | Does this object have a comment with content or is  | 
| #done_documenting | Are we done documenting (ie, did we come across a :enddoc:)? | 
| #done_documenting= | Turns documentation on/off, and turns on/off  | 
| #file | Which file this code object was defined in. | 
| #force_documentation | Force documentation of this  | 
| #force_documentation= | Force the documentation of this object unless documentation has been turned off by :enddoc: | 
| #full_name= | Sets the full_name overriding any computed full name. | 
| #ignored? | Has this class been ignored? | 
| #line | Line in  | 
| #metadata | Hash of arbitrary metadata for this  | 
| #mixin_from | When mixed-in to a class, this points to the  | 
| #parent | Our parent  | 
| #parent= | Sets the parent  | 
| #received_nodoc | Did we ever receive a  | 
| #section | The section this  | 
| #section= | Set the section this  | 
| #store | The  | 
| #store= | Sets the  | 
| #suppressed? | Has this class been suppressed? | 
Text - Included
| #language | The language for this text. | 
Instance Method Summary
- 
    
      #ancestors  
    
    The ancestors of this class including modules. 
- 
    
      #definition  
    
    The definition of this class, class MyClassName.
- #direct_ancestors
- #aref_prefix Internal use only
- #inspect Internal use only
- #pretty_print(q) Internal use only
- #to_s Internal use only
ClassModule - Inherited
| #add_comment | Adds  | 
| #ancestors | Ancestors list for this ClassModule: the list of included modules (classes will add their superclass if any). | 
| #aref | HTML fragment reference for this module or class. | 
| #clear_comment | Clears the comment. | 
| #complete | Prepares this  | 
| #description | Handy wrapper for marking up this class or module’s comment. | 
| #direct_ancestors | Ancestors of this class or module only. | 
| #document_self_or_methods | Does this  | 
| #each_ancestor | Iterates the ancestors of this class or module for which an  | 
| #embed_mixins, | |
| #find_ancestor_local_symbol | Looks for a symbol in the #ancestors. | 
| #find_class_named | Finds a class or module with  | 
| #full_name | Return the fully qualified name of this class or module. | 
| #fully_qualified_nesting_namespaces | Return array of fully qualified nesting namespaces. | 
| #merge | Merges  | 
| #name_for_path | Name to use to generate the url: modules and classes that are aliases for another module or class return the name of the latter. | 
| #nesting_namespaces | Return array of full_name splitted by  | 
| #non_aliases | Returns the classes and modules that are not constants aliasing another class or module. | 
| #parse | Parses  | 
| #path | Path to this class or module for use with HTML generator output. | 
| #remove_nodoc_children | Updates the child modules or classes of class/module  | 
| #search_record | Search record used by  | 
| #super_classes | Get all super classes of this class in an array. | 
| #type | ‘module’ or ‘class’. | 
| #update_aliases | Updates the child modules & classes by replacing the ones that are aliases through a constant. | 
| #update_extends | Deletes from  | 
| #update_includes | Deletes from  | 
| #prepare_to_embed, #add_things, #aref_prefix, | |
| #marshal_dump | TODO: filter included items by  | 
| #marshal_load, | |
| #merge_collections | Merges collection  | 
| #merge_sections | Merges the comments in this  | 
| #remove_things, #to_s | |
Context - Inherited
| #<=> | Contexts are sorted by full_name. | 
| #add | Adds an item of type  | 
| #add_alias | Adds  | 
| #add_attribute | Adds  | 
| #add_class | Adds a class named  | 
| #add_class_or_module | Adds the class or module  | 
| #add_constant | Adds  | 
| #add_extend | Adds extension module  | 
| #add_include | Adds included module  | 
| #add_method | Adds  | 
| #add_module | Adds a module named  | 
| #add_module_alias | Adds an alias from  | 
| #add_module_by_normal_module | Adds a module by  | 
| #add_require | Adds  | 
| #add_section | Returns a section with  | 
| #add_to | Adds  | 
| #any_content | Is there any content? | 
| #child_name | Creates the full name for a child with  | 
| #class_attributes | Class attributes. | 
| #class_method_list | Class methods. | 
| #classes | Array of classes in this context. | 
| #classes_and_modules | All classes and modules in this namespace. | 
| #classes_hash | Hash of classes keyed by class name. | 
| #each_classmodule | Iterator for classes and modules. | 
| #each_method | Iterator for methods. | 
| #each_section | Iterator for each section’s contents sorted by title. | 
| #find_attribute | Finds an attribute  | 
| #find_attribute_named | Finds an attribute with  | 
| #find_class_method_named | Finds a class method with  | 
| #find_constant_named | Finds a constant with  | 
| #find_enclosing_module_named | Find a module at a higher scope. | 
| #find_external_alias | Finds an external alias  | 
| #find_external_alias_named | Finds an external alias with  | 
| #find_instance_method_named | Finds an instance method with  | 
| #find_local_symbol | Finds a method, constant, attribute, external alias, module or file named  | 
| #find_method | Finds a method named  | 
| #find_method_named | Finds a instance or module method with  | 
| #find_module_named | Find a module with  | 
| #find_symbol | Look up  | 
| #find_symbol_module | Look up a module named  | 
| #full_name | The full name for this context. | 
| #http_url | URL for this with a  | 
| #initialize_methods_etc | Sets the defaults for methods and so-forth. | 
| #instance_attributes | Instance attributes. | 
| #instance_method_list | Instance methods. | 
| #instance_methods | Instance methods. | 
| #methods_by_type | Breaks method_list into a nested hash by type ( | 
| #methods_matching | Yields AnyMethod and  | 
| #modules | Array of modules in this context. | 
| #modules_hash | Hash of modules keyed by module name. | 
| #name_for_path | Name to use to generate the url. | 
| #record_location | Record  | 
| #remove_invisible | Removes methods and attributes with a visibility less than  | 
| #resolve_aliases | Tries to resolve unmatched aliases when a method or attribute has just been added. | 
| #section_contents | Returns  | 
| #sections | Sections in this context. | 
| #set_constant_visibility_for | Given an array  | 
| #set_current_section | Sets the current section to a section with  | 
| #set_visibility_for | Given an array  | 
| #sort_sections | Sorts sections alphabetically (default) or in  | 
| #top_level | Return the  | 
| #upgrade_to_class | Upgrades NormalModule  | 
| #display, | |
| #each_ancestor | Iterator for ancestors for duck-typing. | 
| #remove_invisible_in | Only called when min_visibility ==  | 
| #sections_hash, #to_s | |
CodeObject - Inherited
| #file_name | File name where this  | 
| #ignore | Use this to ignore a  | 
| #options | The options instance from the store this  | 
| #parent_name | Name of our parent. | 
| #record_location | Records the  | 
| #start_doc | Enable capture of documentation unless documentation has been turned off by :enddoc: | 
| #stop_doc | Disable capture of documentation. | 
| #suppress | Use this to suppress a  | 
| #initialize_visibility | Initializes state for visibility of this  | 
Generator::Markup - Included
| #aref_to | Generates a relative URL from this object’s path to  | 
| #as_href | Generates a relative URL from  | 
| #canonical_url | The preferred URL for this object. | 
| #cvs_url | Build a webcvs URL starting for the given  | 
| #description | Handy wrapper for marking up this object’s comment. | 
| #formatter | Creates an  | 
Text - Included
| #expand_tabs | Expands tab characters in  | 
| #flush_left | Flush  | 
| #markup | Convert a string in markup format into HTML. | 
| #normalize_comment | Strips hashes, expands tabs then flushes  | 
| #parse | Normalizes  | 
| #snippet | The first  | 
| #strip_hashes | Strips leading # characters from  | 
| #strip_newlines | Strips leading and trailing n characters from  | 
| #strip_stars | Strips /* */ style comments. | 
| #to_html | Converts ampersand, dashes, ellipsis, quotes, copyright and registered trademark symbols in  | 
| #wrap | Wraps  | 
Constructor Details
This class inherits a constructor from RDoc::ClassModule
Instance Method Details
#ancestors
The ancestors of this class including modules.  Unlike Module#ancestors, this class is not included in the result.  The result will contain both RDoc::ClassModules and Strings.
# File 'lib/rdoc/code_object/normal_class.rb', line 12
def ancestors if String === superclass then super << superclass elsif superclass then ancestors = super ancestors << superclass ancestors.concat superclass.ancestors else super end end
#aref_prefix
# File 'lib/rdoc/code_object/normal_class.rb', line 24
def aref_prefix # :nodoc: 'class' end
#definition
The definition of this class, class MyClassName
# File 'lib/rdoc/code_object/normal_class.rb', line 31
def definition "class #{full_name}" end
#direct_ancestors
[ GitHub ]# File 'lib/rdoc/code_object/normal_class.rb', line 35
def direct_ancestors superclass ? super + [superclass] : super end
#inspect
# File 'lib/rdoc/code_object/normal_class.rb', line 39
def inspect # :nodoc: superclass = @superclass ? " < #{@superclass}" : nil "<%s:0x%x class %s%s includes: %p extends: %p attributes: %p methods: %p aliases: %p>" % [ self.class, object_id, full_name, superclass, @includes, @extends, @attributes, @method_list, @aliases ] end
#pretty_print(q)
# File 'lib/rdoc/code_object/normal_class.rb', line 56
def pretty_print(q) # :nodoc: superclass = @superclass ? " < #{@superclass}" : nil q.group 2, "[class #{full_name}#{superclass}", "]" do q.breakable q.text "includes:" q.breakable q.seplist @includes do |inc| q.pp inc end q.breakable q.text "constants:" q.breakable q.seplist @constants do |const| q.pp const end q.breakable q.text "attributes:" q.breakable q.seplist @attributes do |attr| q.pp attr end q.breakable q.text "methods:" q.breakable q.seplist @method_list do |meth| q.pp meth end q.breakable q.text "aliases:" q.breakable q.seplist @aliases do |aliaz| q.pp aliaz end q.breakable q.text "comment:" q.breakable q.pp comment end end
#to_s
# File 'lib/rdoc/code_object/normal_class.rb', line 47
def to_s # :nodoc: display = "#{self.class.name} #{self.full_name}" if superclass display += ' < ' + (superclass.is_a?(String) ? superclass : superclass.full_name) end display += ' -> ' + is_alias_for.to_s if is_alias_for display end