module Asciidoctor::Extensions::IncludeProcessorDsl - asciidoctor-1.5.6.2 Documentation

# module Asciidoctor::Extensions::IncludeProcessorDsl

### Private Instance Methods

handles?(*args, &block) click to toggle source

    # File lib/asciidoctor/extensions.rb, line 401
    def handles? *args, &block
      if block_given?
        raise ::ArgumentError, %Q(wrong number of arguments (given #{args.size}, expected 0)) unless args.empty?
        @handles_block = block
      # TODO enable if we want to support passing proc or lambda as argument instead of block
      #elsif ::Proc === args[0]
      #  block = args.shift
      #  raise ::ArgumentError, %(wrong number of arguments (given #{args.size}, expected 0)) unless args.empty?
      #  @handles_block = block
      elsif defined? @handles_block
        @handles_block.call args[0]
      else
        true
      end
    end