Companion to `method_missing`

 This method reeks of :reek:BooleanParameter.

 @param name [Symbol|String]
 @param _include_private [Boolean]

 @return [Boolean]
 @api private
773176
def respond_to_missing?(name, _include_private = false)
      str_name = name.to_s
      key?(name.to_sym) || %w[? !].any?(&str_name.method(:end_with?)) || super
    end
409446
def method_missing(name, *args)
      if name.to_s == "#{model_name.underscore}_params"
        return params.reject{|k,v| %w(splat captures id updated_at created_at).include? k}
      end
    end
182657
def method_missing(method, *args, &code)
    success = false
    result  = nil

    if method.to_s.match(/^set\_([a-z].*)$/)
      name = $1.to_sym

      if @types.has_key?(name) && args.length > 2
        @types[name].set([ args[0], args[1] ], args[2]) if args.length > 2
        success = true
      end

    elsif method.to_s.match(/^remove\_([a-z].*)$/)
      name = $1.to_sym

      if @types.has_key?(name) && args.length > 0
        @types[name].delete([ args[0], args[1] ])
        success = true
      end

    else
      name = @plurals[method.to_sym]

      if name && @types.has_key?(name)
        result  = @types[name]
        success = true
      end
    end
    super unless success # Raise NoMethodError
    result
  end
603617
def respond_to?(method_name, include_private_methods = false)
      attr = "@#{method_name}"
      return super if method_name.match(/[\?!]$/) || !instance_variable_defined?(attr)
      true
    end
598831
def method_missing(method_id, *args, &block)
      return super unless context.respond_to? method_id
      context.public_send method_id, *args, &block
    end
1166611
def method_missing(method, *args, &block)
      self.class.class_eval do
        attr_accessor method.to_sym

        # Defined a method according to the given method name
        define_method method.to_sym do
          obj = OpenStruct.new(request_options: @request_options)
          obj.extend Zcloudjp.const_get(method.capitalize.to_sym)
          instance_variable_set(:"@#{method}", obj)
        end
      end

      # Sends to the now-defined method.
      self.__send__(method.to_sym)
    end
555617
def respond_to_missing?(method_name, include_private = false)
      observer.respond_to?(method_name.to_sym) ||
        env.aliases.include?(method_name.to_sym) || super
    end
1367191
def respond_to_missing?(name, include_private = false)
      known_action?(name) ||
        known_resource?(name) ||
        known_exception?(name) ||
        super
    end
1007161
protected boolean getBooleanMethodParam(String methodName, String paramKey, boolean defaultValue) {
        if (CommonUtils.isEmpty(configContext)) {
            return defaultValue;
        }
        Boolean o = (Boolean) configContext.get(buildMethodKey(methodName, paramKey));
        if (o == null) {
            o = (Boolean) configContext.get(paramKey);
            return o == null ? defaultValue : o;
        } else {
            return o;
        }
    }
399462
def method_missing(method_name, *arguments, &block)
      super unless dynamic_method?(method_name)

      if dynamic_state_check?(method_name)
        # Used to check state - allows for methods such as #published? and #expired?
        # Will return true if the active_state corresponds to the name of the method
        "#{publish_state.downcase}?" == method_name.to_s
      else
        # Used to query for any field on the relevant ContentType and return data from the content_item
        field_items.find { |field_item| field_item.field.name.parameterize(separator: '_') == method_name.to_s }.data.values.first
      end
    end
508688
private void checkNameVisibility(Scope scope, Node name) {
    if (!name.isName()) {
      return;
    }

    Var var = scope.getVar(name.getString());
    if (var == null) {
      return;
    }

    Visibility v = checkPrivateNameConvention(
        AccessControlUtils.getEffectiveNameVisibility(
            name, var, defaultVisibilityForFiles), name);

    switch (v) {
      case PACKAGE:
        if (!isPackageAccessAllowed(var, name)) {
          compiler.report(
              JSError.make(
                  name,
                  BAD_PACKAGE_PROPERTY_ACCESS,
                  name.getString(),
                  var.getSourceFile().getName()));
        }
        break;
      case PRIVATE:
        if (!isPrivateAccessAllowed(var, name)) {
          compiler.report(
              JSError.make(
                  name,
                  BAD_PRIVATE_GLOBAL_ACCESS,
                  name.getString(),
                  var.getSourceFile().getName()));
        }
        break;
      default:
        // Nothing to do for PUBLIC and PROTECTED
        // (which is irrelevant for names).
        break;
    }
  }
677761
def method_missing(name, *args, &block)
      return meta[name.to_s] if meta.key?(name.to_s)
      super
    end
353468
def method_missing(name, *args, &block)
      if args.empty? && !block_given? && @arg_names.include?(name)
        @args[name]
      else
        super
      end
    end
1371920
def method?(name)
      begin
        klass = Esi::Calls.const_get(method_to_class_name(name))
      rescue NameError
        return false
      end
      !klass.nil?
    end
751282
protected function isIncluded($_name)
    {
        for ($i = 0, $_i = count($this->includes); $i < $_i; $i++) {
            if ($this->matchPath($this->includes[$i], $_name, $this->isCaseSensitive)) {
                return true;
            }
        }

        return false;
    }
12365
def respond_to? method, include_private=false
      attribute = self.meta_attributes.select { |x| method.match /^#{x}(_id)?=?$/ }.pop
      if attribute
        self.class.find_object_from(attribute) ? true : !method.match(/^#{attribute}=?$/).nil?
      else
        super
      end
    end
245257
public boolean getParameterAsBoolean(String name, Boolean defaultValue) {
		return defaultValue(stringToBoolean(getParameter(name)), defaultValue);
	}