Class: Lazydoc::Subject
Overview
A special type of self-resolving Comment whose to_s returns the subject, or an empty string if subject is nil.
s = Subject.new s.subject = “subject string” s.to_s # => “subject string”
Instance Attribute Summary
Attributes inherited from Comment
#content, #document, #line_number, #subject
Instance Method Summary collapse
-
#to_s ⇒ Object
Self-resolves and returns subject, or an empty string if subject is nil.
Methods inherited from Comment
#<<, #append, #comment, #empty?, #initialize, #parse_down, #parse_up, #prepend, #push, #resolve, #trailer, #trim, #unshift, #value, #value=, #wrap
Methods included from Utils
categorize, convert_to_scanner, determine_line_number, match_index, scan, scan_args, scan_index, scan_trailer, skip_quote, split_lines, wrap
Constructor Details
This class inherits a constructor from Lazydoc::Comment
Instance Method Details
#to_s ⇒ Object
Self-resolves and returns subject, or an empty string if subject is nil.
14 15 16 17 |
# File 'lib/lazydoc/subject.rb', line 14 def to_s resolve subject.to_s end |