Class: FFI::Clang::ParamCommandComment

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

Overview

Represents a parameter documentation command (e.g., param, arg).

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

#directionObject

Get the parameter direction.



288
289
290
# File 'lib/ffi/clang/comment.rb', line 288

def direction
  Lib.param_command_comment_get_direction(@comment)
end

#direction_explicit?Boolean

Check if the parameter direction is explicitly specified.



282
283
284
# File 'lib/ffi/clang/comment.rb', line 282

def direction_explicit?
  Lib.param_command_comment_is_direction_explicit(@comment) != 0
end

#indexObject

Get the parameter index in the function signature.



276
277
278
# File 'lib/ffi/clang/comment.rb', line 276

def index
  Lib.param_command_comment_get_param_index(@comment)
end

#nameObject

Get the parameter name being documented.



256
257
258
# File 'lib/ffi/clang/comment.rb', line 256

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

#textObject Also known as: comment

Get the documentation text for this parameter.



262
263
264
# File 'lib/ffi/clang/comment.rb', line 262

def text
  self.map(&:text).join("")
end

#valid_index?Boolean

Check if the parameter index is valid.



270
271
272
# File 'lib/ffi/clang/comment.rb', line 270

def valid_index?
  Lib.param_command_comment_is_param_index_valid(@comment) != 0
end