Class: FFI::Clang::HTMLStartTagComment
- Inherits:
-
HTMLTagComment
- Object
- Comment
- HTMLTagComment
- FFI::Clang::HTMLStartTagComment
- Defined in:
- lib/ffi/clang/comment.rb
Overview
Represents an HTML start tag in a documentation comment.
Instance Method Summary collapse
-
#attrs ⇒ Object
Get all attributes on this tag.
-
#num_attrs ⇒ Object
Get the number of attributes on this tag.
-
#self_closing? ⇒ Boolean
Check if this is a self-closing tag.
Methods inherited from HTMLTagComment
Methods inherited from Comment
build_from, #child, #children, #each, #has_trailing_newline?, #initialize, #kind, #num_children, #text, #whitespace?
Constructor Details
This class inherits a constructor from FFI::Clang::Comment
Instance Method Details
#attrs ⇒ Object
Get all attributes on this tag.
155 156 157 158 159 160 161 162 |
# File 'lib/ffi/clang/comment.rb', line 155 def attrs num_attrs.times.map{|i| { name: Lib.extract_string(Lib.html_start_tag_comment_get_attr_name(@comment, i)), value: Lib.extract_string(Lib.html_start_tag_comment_get_attr_value(@comment, i)), } } end |
#num_attrs ⇒ Object
Get the number of attributes on this tag.
149 150 151 |
# File 'lib/ffi/clang/comment.rb', line 149 def num_attrs Lib.html_start_tag_comment_get_num_attrs(@comment) end |
#self_closing? ⇒ Boolean
Check if this is a self-closing tag.
143 144 145 |
# File 'lib/ffi/clang/comment.rb', line 143 def self_closing? Lib.html_start_tag_comment_is_self_closing(@comment) != 0 end |