Class: FFI::Clang::FullComment

Inherits:
Comment
  • Object
show all
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

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

#textObject

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_htmlObject

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_xmlObject

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