Class RI::MethodDescription
In: lib/ihelp.rb
Parent: Object
MethodDescription Attribute Constant ClassDescription MethodSummary lib/ihelp.rb RI dot/m_0_0.png

Methods

to_html   to_text  

Public Instance methods

Creates HTML element from the MethodDescription. Uses container_tag as the root node name and header_tag as the tag for the header element that contains the method‘s name.

Returns a REXML document with container_tag as the root element name.

[Source]

     # File lib/ihelp.rb, line 844
844:     def to_html(container_tag="div", header_tag="h1")
845:       doc = REXML::Document.new
846:       root = doc.add_element(container_tag)
847:       header = root.add_element(header_tag)
848:       header.add_text(full_name)
849:       comment.each{|c|
850:         root.add_element( c.to_html.root )
851:       }
852:       doc
853:     end

[Source]

     # File lib/ihelp.rb, line 855
855:     def to_text
856:       name + " -- " + params.to_s + block_params.to_s + "\n" +
857:       (comment || []).map{|c| c.to_text }.join("\n")
858:     end

[Validate]