class Asciidoctor::Extensions::Registry

def activate document

Returns the instance of this [Registry].

document - the {Asciidoctor::Document} on which the extensions are to be used.

associated with this registry.
Public: Activates all the global extension {Group}s and the extension {Group}s
def activate document
  @document = document
  unless (ext_groups = Extensions.groups.values + @groups.values).empty?
    ext_groups.each do |group|
      case group
      when ::Proc
        case group.arity
        when 0, -1
          instance_exec(&group)
        when 1
          group.call self
        end
      when ::Class
        group.new.activate self
      else
        group.activate self
      end
    end
  end
  self
end