class TomParse::TomDoc
Encapsulate parsed tomdoc documentation.
TODO: Currently uses lazy evaluation, eventually this should be removed and simply parsed all at once.
Attributes
Public Class Methods
Validate given comment text.
Returns true if comment is valid, otherwise false.
# File lib/tomparse.rb, line 44 def self.valid?(text) new(text).valid? end
Public Instance Methods
Arguments list.
Returns list of arguments.
# File lib/tomparse.rb, line 89 def arguments @parser.arguments end
Check if method is deprecated.
Returns true if method is deprecated.
# File lib/tomparse.rb, line 171 def deprecated? @parser.deprecated? end
Description of method or class/module.
Returns description String.
# File lib/tomparse.rb, line 82 def description @parser.description end
List of use examples of a method or class/module.
Returns String of examples.
# File lib/tomparse.rb, line 105 def examples @parser.examples end
Check if method is internal.
Returns true if method is internal.
# File lib/tomparse.rb, line 164 def internal? @parser.internal? end
Keyword arguments, aka Options.
Returns list of options.
# File lib/tomparse.rb, line 97 def options @parser.options end
Check if method is public.
Returns true if method is public.
# File lib/tomparse.rb, line 157 def public? @parser.public? end
A list of errors a method might raise.
Returns Array of method raises descriptions.
# File lib/tomparse.rb, line 126 def raises @parser.raises end
The list of retrun values a method can return.
Returns Array of method return descriptions.
# File lib/tomparse.rb, line 119 def returns @parser.returns end
List of comment sections. These are divided simply on “nn”.
Returns Array of comment sections.
# File lib/tomparse.rb, line 75 def sections @parser.sections end
Deprecated: A list of signature fields.
TODO: Presently this will always return an empty list. It will either be removed or renamed in future version.
Returns Array of field definitions.
# File lib/tomparse.rb, line 143 def signature_fields @parser.signature_fields end
A list of alternate method signatures.
Returns Array of signatures.
# File lib/tomparse.rb, line 133 def signatures @parser.signatures end
Raw documentation text.
Returns String of raw documentation text.
# File lib/tomparse.rb, line 37 def to_s @parser.raw end
The raw comment text cleaned-up and ready for section parsing.
Returns cleaned-up comment String.
# File lib/tomparse.rb, line 68 def tomdoc return @parser.tomdoc end
Validate raw comment.
Returns true if comment is valid, otherwise false.
# File lib/tomparse.rb, line 51 def valid? @parser.valid? end
Validate raw comment.
Returns true if comment is valid. Raises ParseError
if comment is not valid.
# File lib/tomparse.rb, line 59 def validate @parser.validate end
Description of a methods yield procedure.
Returns String decription of yield procedure.
# File lib/tomparse.rb, line 112 def yields @parser.yields end