class Nokogiri::XML::Node
def kwattr_values(attribute_name)
node.kwattr_values("rel") # => ["nofollow", "noopener", "external"]
node # => link
*Example:*
attribute is empty or non-existent, the return value is an empty array.
(Array
[Returns]
- +attribute_name+ (String) The name of the keyword attribute to be inspected.
[Parameters]
See also #classes, #kwattr_add, #kwattr_append, #kwattr_remove
{the "rel" attribute}[https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/rel].
contain CSS classes. But other keyword attributes exist, for instance
values. Perhaps the most familiar example of this is the HTML "class" attribute used to
A "keyword attribute" is a node attribute that contains a set of space-delimited
Fetch values from a keyword attribute of a Node.
kwattr_values(attribute_name) → Array
:call-seq:
def kwattr_values(attribute_name) keywordify(get_attribute(attribute_name) || []) end