Class: FFI::Clang::HTMLStartTagComment

Inherits:
HTMLTagComment show all
Defined in:
lib/ffi/clang/comment.rb

Instance Method Summary collapse

Methods inherited from HTMLTagComment

#name, #text

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

#attrsObject



125
126
127
128
129
130
131
132
# File 'lib/ffi/clang/comment.rb', line 125

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_attrsObject



121
122
123
# File 'lib/ffi/clang/comment.rb', line 121

def num_attrs
	Lib.html_start_tag_comment_get_num_attrs(@comment)
end

#self_closing?Boolean

Returns:

  • (Boolean)


117
118
119
# File 'lib/ffi/clang/comment.rb', line 117

def self_closing?
	Lib.html_start_tag_comment_is_self_closing(@comment) != 0
end