# File lib/buildr/core/filter.rb, line 292
      def using(*args, &block)
        case args.first
        when Hash # Maven hash mapping
          using :maven, *args
        when Binding # Erb binding
          using :erb, *args
        when Symbol # Mapping from a method
          raise ArgumentError, "Unknown mapping type: #{args.first}" unless respond_to?("#{args.first}_transform", true)
          configure(*args, &block)
        when Regexp # Mapping using a regular expression
          raise ArgumentError, 'Expected regular expression followed by mapping hash' unless args.size == 2 && Hash === args[1]
          @mapper_type, @config = *args
        else
          unless args.empty? && block.nil?
            raise ArgumentError, 'Expected proc, method or a block' if args.size > 1 || (args.first && block)
            @mapper_type = :callback
            config = args.first || block
            raise ArgumentError, 'Expected proc, method or callable' unless config.respond_to?(:call)
            @config = config
          end
        end
        self
      end