rubocop:disable Metrics/MethodLength
180224
def available_spies
      %w[
        delayed_job
        elasticsearch
        faraday
        http
        json
        mongo
        net_http
        redis
        sequel
        sidekiq
        sinatra
        tilt
        rake
      ]
    end
1297243
def def_method(object, method_name, filename=nil)
      m = object.is_a?(Module) ? :module_eval : :instance_eval
      object.__send__(m, "def #{method_name}; #{@src}; end", filename || @filename || '(erubis)')
    end
858942
def method_missing(method, *args)
      if (i = dimension_method_names.find_index(method))
        define_singleton_method(method) do
          dimensions[i]
        end
        send(method)
      elsif (i = metric_method_names.find_index(method))
        define_singleton_method(method) do
          convert_metric(i)
        end
        send(method)
      else
        super
      end
    end
499256
def method_missing(method, *args, &block)
      name = method.to_s
      if respond_to_missing? name
        @bases[name]
      else
        super(method, *args, &block)
      end
    end
868201
def method_missing(m, *args, &block)
      if m.to_s.end_with?("_url") || m.to_s.end_with?("_path")
        "/"
      else
        super
      end
    end
528876
def method_missing(*args)
      path = args.first.to_s
      if args.length == 1 && path.end_with?('.md')
        convert(path)
      else
        return super(*args)
      end
    end
255275
def method_missing(meth, *args, &block)
      db.to_hash(:key, :value).send(meth, *args, &block)
    end
575066
def method_missing(meth, *args, &block)
      @namespace = meth.to_s
      @message   = (args.first.to_s == 'debug') ? nil : args.first.to_s
      self.send :output!
    end
364199
def [](input)
      key = __convert_key(input)
      return @__config.key_error.call(key) if not key?(key)

      super(key)
    end
635990
def method_missing(meth, *args, &block)
      if meth.to_s =~ /=$/
        self.define_accessors(meth.to_s.gsub(/=$/,''))
        return self.send(meth, *args, &block)
      end
      super
    end
26450
def method_missing(method_name, *_args)
      if attrs.key?(method_name.to_s)
        attrs[method_name.to_s]
      else
        super(method_name)
      end
    end
1069886
def method_missing(id, *args, &block)
      ids = id.to_s
      if instance_variable_defined?(:@attributes)
        return @attributes[id] if @attributes.has_key?(id)
        return @attributes[ids] if @attributes.has_key?(ids)
      end
      raise NoMethodError.new("#{ids} not found", name)
    end
1314000
def method_missing(method, *args)
      if @builders.has_key?(method.to_s)
        target, sources, vars, *rest = args
        vars ||= {}
        unless vars.is_a?(Hash) or vars.is_a?(VarSet)
          raise "Unexpected construction variable set: #{vars.inspect}"
        end
        builder = @builders[method.to_s]
        target = expand_path(expand_varref(target))
        sources = Array(sources).map do |source|
          expand_path(expand_varref(source))
        end.flatten
        build_target = builder.create_build_target(env: self, target: target, sources: sources, vars: vars)
        add_target(build_target.to_s, builder, sources, vars, rest)
        build_target
      else
        super
      end
    end
412742
def method_missing(sym, *args, &block)
      if self.internal_object.key?(sym.to_s)
        return self.internal_object[sym.to_s]
      end

      super
    end
530776
def method_missing(method, *args, &block)
      if method[-1] == '='
        # setter
        key = method.slice(0...-1).to_sym

        unless has_key?(key)
          super
        end
        self[key] = args[0]
      else
        unless has_key?(method)
          super
        end

        prop = self[method]
        if prop.is_a? JSFunction
          prop.call_with_instance(self, *args, &block)
        else
          prop
        end
      end
    end
336415
def method_missing(method, *args)
      unless args.size == 1 && [Hash, Array].include?(args[0].class)
        raise 'Expected 1 Hash or Array argument'
      end

      call_remote method, args[0]
    end
237926
def [](attr)
      return nil unless instance_variable_defined?(:@attributes) and @attributes.is_a?(Hash)
      @attributes[attr] or (attr.is_a?(String) ? @attributes[attr.to_sym] : @attributes[attr.to_s])
    end