Class: FFI::Clang::BlockCommandComment
- Defined in:
- lib/ffi/clang/comment.rb
Overview
Represents a block command comment (e.g., brief, return).
Instance Method Summary collapse
-
#args ⇒ Object
Get all arguments to this command.
-
#name ⇒ Object
Get the command name.
-
#num_args ⇒ Object
Get the number of arguments to this command.
-
#paragraph ⇒ Object
Get the paragraph comment associated with this block command.
-
#text ⇒ Object
(also: #comment)
Get the text content from the paragraph.
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
#args ⇒ Object
Get all arguments to this command.
245 246 247 248 249 |
# File 'lib/ffi/clang/comment.rb', line 245 def args num_args.times.map {|i| Lib.extract_string Lib.block_command_comment_get_arg_text(@comment, i) } end |
#name ⇒ Object
Get the command name.
220 221 222 |
# File 'lib/ffi/clang/comment.rb', line 220 def name Lib.extract_string Lib.block_command_comment_get_command_name(@comment) end |
#num_args ⇒ Object
Get the number of arguments to this command.
239 240 241 |
# File 'lib/ffi/clang/comment.rb', line 239 def num_args Lib.block_command_comment_get_num_args(@comment) end |
#paragraph ⇒ Object
Get the paragraph comment associated with this block command.
226 227 228 |
# File 'lib/ffi/clang/comment.rb', line 226 def paragraph Comment.build_from Lib.block_command_comment_get_paragraph(@comment) end |
#text ⇒ Object Also known as: comment
Get the text content from the paragraph.
232 233 234 |
# File 'lib/ffi/clang/comment.rb', line 232 def text self.paragraph.text end |