class Asciidoctor::AbstractNode

def has_role? name

Returns a [Boolean] indicating whether this node has the specified role.

name - The String name of the role to find.

Public: Checks if the specified role is present in the list of roles for this node.
def has_role? name
  # NOTE center + include? is faster than split + include?
  (val = @attributes['role']) ? (%( #{val} ).include? %( #{name} )) : false
end