Class: FFI::Clang::FullComment
- Defined in:
- lib/ffi/clang/comment.rb
Overview
Represents a complete documentation comment with all its components. This is the top-level comment structure that can be converted to HTML or XML.
Instance Method Summary collapse
-
#text ⇒ Object
Get the text by collecting and joining all child text.
-
#to_html ⇒ Object
Convert this documentation comment to HTML.
-
#to_xml ⇒ Object
Convert this documentation comment to XML.
Methods inherited from Comment
build_from, #child, #children, #each, #has_trailing_newline?, #initialize, #kind, #num_children, #whitespace?
Constructor Details
This class inherits a constructor from FFI::Clang::Comment
Instance Method Details
#text ⇒ Object
Get the text by collecting and joining all child text.
372 373 374 |
# File 'lib/ffi/clang/comment.rb', line 372 def text self.children.collect{|child| child.text.strip}.join("\n") end |
#to_html ⇒ Object
Convert this documentation comment to HTML.
360 361 362 |
# File 'lib/ffi/clang/comment.rb', line 360 def to_html Lib.extract_string Lib.full_comment_get_as_html(@comment) end |
#to_xml ⇒ Object
Convert this documentation comment to XML.
366 367 368 |
# File 'lib/ffi/clang/comment.rb', line 366 def to_xml Lib.extract_string Lib.full_comment_get_as_xml(@comment) end |