module Asciidoctor::Extensions::IncludeProcessorDsl
Public Instance Methods
handles?(*args, &block)
click to toggle source
# File lib/asciidoctor/extensions.rb, line 460 def handles? *args, &block if block_given? raise ::ArgumentError, %(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