method
comment=
ruby latest stable - Class:
RDoc::CodeObject
comment=(comment)public
Replaces our comment with comment, unless it is empty.
# File lib/rdoc/code_object.rb, line 135
def comment=(comment)
@comment = case comment
when NilClass then ''
when RDoc::Markup::Document then comment
when RDoc::Comment then comment.normalize
else
if comment and not comment.empty? then
normalize_comment comment
else
# HACK correct fix is to have #initialize create @comment
# with the correct encoding
if String === @comment and @comment.empty? then
@comment = RDoc::Encoding.change_encoding @comment, comment.encoding
end
@comment
end
end
end Related methods
- Instance methods
- comment=
- display?
- document_children=
- document_self=
- documented?
- done_documenting=
- each_parent
- file_name
- force_documentation=
- full_name=
- ignore
- ignored?
- initialize_visibility
- options
- parent
- parent_file_name
- parent_name
- record_location
- section
- start_doc
- stop_doc
- store=
- suppress
- suppressed?
- Class methods
- new