class Asciidoctor::AbstractNode

def remove_role name

Returns a [Boolean] indicating whether the role was removed.

Public: Removes the given role directly from this node.
def remove_role name
  if (val = @attributes['role']) && ((val = val.split).delete name)
    if val.empty?
      @attributes.delete 'role'
    else
      @attributes['role'] = val.join ' '
    end
    true
  else
    false
  end
end