Class: FFI::Clang::CodeCompletion::String
- Inherits:
-
Object
- Object
- FFI::Clang::CodeCompletion::String
- Defined in:
- lib/ffi/clang/code_completion.rb
Instance Method Summary collapse
- #annotation(i) ⇒ Object
- #annotations ⇒ Object
- #availability ⇒ Object
- #chunk_completion(i) ⇒ Object
- #chunk_kind(i) ⇒ Object
- #chunk_text(i) ⇒ Object
- #chunks ⇒ Object
- #comment ⇒ Object
-
#initialize(ptr) ⇒ String
constructor
A new instance of String.
- #inspect ⇒ Object
- #num_annotations ⇒ Object
- #num_chunks ⇒ Object
- #parent ⇒ Object
- #priority ⇒ Object
Constructor Details
#initialize(ptr) ⇒ String
Returns a new instance of String.
119 120 121 |
# File 'lib/ffi/clang/code_completion.rb', line 119 def initialize(ptr) @pointer = ptr end |
Instance Method Details
#annotation(i) ⇒ Object
157 158 159 |
# File 'lib/ffi/clang/code_completion.rb', line 157 def annotation(i) Lib.extract_string Lib.get_completion_annotation(@pointer, i) end |
#annotations ⇒ Object
161 162 163 164 165 |
# File 'lib/ffi/clang/code_completion.rb', line 161 def annotations num_annotations.times.map { |i| Lib.extract_string Lib.get_completion_annotation(@pointer, i) } end |
#availability ⇒ Object
149 150 151 |
# File 'lib/ffi/clang/code_completion.rb', line 149 def availability Lib.get_completion_availability(@pointer) end |
#chunk_completion(i) ⇒ Object
131 132 133 |
# File 'lib/ffi/clang/code_completion.rb', line 131 def chunk_completion(i) CodeCompletion::String.new Lib.get_completion_chunk_completion_string(@pointer, i) end |
#chunk_kind(i) ⇒ Object
123 124 125 |
# File 'lib/ffi/clang/code_completion.rb', line 123 def chunk_kind(i) Lib.get_completion_chunk_kind(@pointer, i) end |
#chunk_text(i) ⇒ Object
127 128 129 |
# File 'lib/ffi/clang/code_completion.rb', line 127 def chunk_text(i) Lib.extract_string Lib.get_completion_text(@pointer, i) end |
#chunks ⇒ Object
139 140 141 142 143 |
# File 'lib/ffi/clang/code_completion.rb', line 139 def chunks num_chunks.times.map { |i| { kind: chunk_kind(i), text: chunk_text(i), completion: chunk_completion(i) } } end |
#comment ⇒ Object
171 172 173 |
# File 'lib/ffi/clang/code_completion.rb', line 171 def comment Lib.extract_string Lib.get_completion_brief_comment(@pointer) end |
#inspect ⇒ Object
175 176 177 |
# File 'lib/ffi/clang/code_completion.rb', line 175 def inspect chunks.inspect end |
#num_annotations ⇒ Object
153 154 155 |
# File 'lib/ffi/clang/code_completion.rb', line 153 def num_annotations Lib.get_completion_num_annotations(@pointer) end |
#num_chunks ⇒ Object
135 136 137 |
# File 'lib/ffi/clang/code_completion.rb', line 135 def num_chunks Lib.get_num_completion_chunks(@pointer) end |
#parent ⇒ Object
167 168 169 |
# File 'lib/ffi/clang/code_completion.rb', line 167 def parent Lib.extract_string Lib.get_completion_parent(@pointer, nil) end |
#priority ⇒ Object
145 146 147 |
# File 'lib/ffi/clang/code_completion.rb', line 145 def priority Lib.get_completion_priority(@pointer) end |