Class: FFI::Clang::InlineCommandComment
- Defined in:
- lib/ffi/clang/comment.rb
Overview
Represents an inline command comment (e.g., c, p).
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.
-
#render_kind ⇒ Object
Get the render kind for this inline command.
-
#text ⇒ Object
Get the text by joining all arguments.
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.
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 |
#name ⇒ Object
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_args ⇒ Object
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_kind ⇒ Object
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 |
#text ⇒ Object
Get the text by joining all arguments.
211 212 213 |
# File 'lib/ffi/clang/comment.rb', line 211 def text args.join end |