def collect_methods(include_ancestors, *methods_or_modules)
      methods_or_modules.inject([]) {|methods, method_or_module|
        case method_or_module
        when Symbol, String
          methods << method_or_module.to_sym
        when Module # also includes classes
          methods.concat(method_or_module.instance_methods(include_ancestors))
        when Array
          methods.concat(method_or_module)
        else
          raise ArgumentError, "Bad argument: #{method_or_module.inspect}"
        end
      }
    end
def collect_methods(include_ancestors, *methods_or_modules)
      methods_or_modules.inject([]) {|methods, method_or_module|
        case method_or_module
        when Symbol, String
          methods << method_or_module.to_sym
        when Module # also includes classes
          methods.concat(method_or_module.instance_methods(include_ancestors))
        when Array
          methods.concat(method_or_module)
        else
          raise ArgumentError, "Bad argument: #{method_or_module.inspect}"
        end
      }
    end
Given a list of classes, modules, strings, and symbols, compile
 a combined list of methods. Classes and modules will be queried
 for their instance methods; strings and symbols will be treated
 as methods names. +include_ancestors+ determines whether to
 include methods defined by class/module ancestors.