Class: FFI::Clang::InlineCommandComment

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

Overview

Represents an inline command comment (e.g., c, p).

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.



203
204
205
206
207
# File 'lib/ffi/clang/comment.rb', line 203

def args
  num_args.times.map {|i|
    Lib.extract_string Lib.inline_command_comment_get_arg_text(@comment, i)
  }
end

#nameObject

Get the command name.



185
186
187
# File 'lib/ffi/clang/comment.rb', line 185

def name
  Lib.extract_string Lib.inline_command_comment_get_command_name(@comment)
end

#num_argsObject

Get the number of arguments to this command.



197
198
199
# File 'lib/ffi/clang/comment.rb', line 197

def num_args
  Lib.inline_command_comment_get_num_args(@comment)
end

#render_kindObject

Get the render kind for this inline command.



191
192
193
# File 'lib/ffi/clang/comment.rb', line 191

def render_kind
  Lib.inline_command_comment_get_render_kind(@comment)
end

#textObject

Get the text by joining all arguments.



211
212
213
# File 'lib/ffi/clang/comment.rb', line 211

def text
  args.join
end