Class: FFI::Clang::Comment
- Inherits:
-
Object
- Object
- FFI::Clang::Comment
show all
- Includes:
- Enumerable
- Defined in:
- lib/ffi/clang/comment.rb
Direct Known Subclasses
BlockCommandComment, FullComment, HTMLTagComment, InlineCommandComment, ParagraphComment, ParamCommandComment, TParamCommandComment, TextComment, VerbatimBlockCommandComment, VerbatimBlockLineComment, VerbatimLine
Class Method Summary
collapse
Instance Method Summary
collapse
Constructor Details
#initialize(comment) ⇒ Comment
Returns a new instance of Comment.
57
58
59
|
# File 'lib/ffi/clang/comment.rb', line 57
def initialize()
@comment =
end
|
Class Method Details
.build_from(comment) ⇒ Object
Instance Method Details
#child(n = 0) ⇒ Object
69
70
71
|
# File 'lib/ffi/clang/comment.rb', line 69
def child(n = 0)
Comment.build_from Lib.(@comment, n)
end
|
#children ⇒ Object
73
74
75
|
# File 'lib/ffi/clang/comment.rb', line 73
def children
num_children.times.map { |i| child(i) }
end
|
#each(&block) ⇒ Object
85
86
87
88
89
|
# File 'lib/ffi/clang/comment.rb', line 85
def each(&block)
num_children.times.map do |i|
block.call(child(i))
end
end
|
#has_trailing_newline? ⇒ Boolean
81
82
83
|
# File 'lib/ffi/clang/comment.rb', line 81
def has_trailing_newline?
Lib.(@comment) != 0
end
|
#kind ⇒ Object
61
62
63
|
# File 'lib/ffi/clang/comment.rb', line 61
def kind
Lib.(@comment)
end
|
#num_children ⇒ Object
65
66
67
|
# File 'lib/ffi/clang/comment.rb', line 65
def num_children
Lib.(@comment)
end
|
#text ⇒ Object
53
54
55
|
# File 'lib/ffi/clang/comment.rb', line 53
def text
return ""
end
|
#whitespace? ⇒ Boolean
77
78
79
|
# File 'lib/ffi/clang/comment.rb', line 77
def whitespace?
Lib.(@comment) != 0
end
|