class Asciidoctor::AbstractNode

def has_role?(name)

in the list of roles on this node
Public: A convenience method that checks if the specified role is present
def has_role?(name)
  if (val = (@attributes['role'] || @document.attributes['role']))
    val.split(' ').include?(name)
  else
    false
  end
end