Class: FFI::Clang::BlockCommandComment

Inherits:
Comment
  • Object
show all
Defined in:
lib/ffi/clang/comment.rb

Overview

Represents a block command comment (e.g., brief, return).

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

#argsObject

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

#nameObject

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_argsObject

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

#paragraphObject

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

#textObject 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