module Roda::RodaPlugins::SymbolClassMatchers_::ClassMethods

def _merge_matcher_blocks(type, obj, block, matcher_meth)

Otherwise, return matcher_meth or block.
if matcher_method returns a truthy value.
the newly defined method with the return values of matcher_meth
proc that calls matcher_meth first, and only calls
define a method for block, and then return a
If both block and matche_meth are given,
def _merge_matcher_blocks(type, obj, block, matcher_meth)
  if matcher_meth
    if block
      convert_meth = :"_convert_merge_#{type}_#{obj}"
      define_method(convert_meth, &block)
      private convert_meth
      proc do |*a|
        if captures = send(matcher_meth, *a)
          if captures.is_a?(Array)
            send(convert_meth, *captures)
          else
            send(convert_meth, captures)
          end
        end
      end
    else
      matcher_meth
    end
  else
    block
  end
end