rubocop:enable Metrics/MethodLength
 @return [self]
169676
def where_uniqable(uid)
      where_sql = key_uid?(uid) ?
                      uniqable_fields.map { |r| "#{table_name}.#{r} = :uid" }.join(' OR ') :
                      "#{table_name}.#{self.primary_key} = :uid"
      where(where_sql, uid: uid)
    end
107235
def method_missing(method, *args, &block)
      if args.any? && args.first.is_a?(Hash)
        _links.send(method, [], &block)._expand(*args)
      elsif !Array.method_defined?(method)
        %i[_attributes _embedded _links].each do |target|
          target = send(target)
          return target.send(method, *args, &block) if target.respond_to?(method.to_s)
        end
        super
      end
    end
681772
def method_signature
      @parameters.map { |info| info.name == 'body' ? "body = {}" : Heroics.ruby_name(info.name) }.join(', ')
    end
1345539
def method_missing(method_name, *arguments, &block)
      ivar = "@#{method_name.to_s.gsub('=', '')}"
      ivar_sym = ":#{ivar}"
      if method_name[-1] == '?'
        return id == method_name[0..-2].to_sym
      elsif method_name[-1] == '='
        define_singleton_method(method_name) do |val|
          instance_variable_set(ivar, val)
        end
      elsif instance_variables.include? ivar_sym
        instance_variable_get(ivar)
      else
        define_singleton_method(method_name) do
          instance_variable_get(ivar)
        end
      end
      send(method_name, *arguments, &block)
    end
1273831
def instance_method_hash(options)
      ChainOptions::Util.slice(options, Option::METHOD_SYMBOLS).each_with_object({}) do |(meth, value), h|
        next h[meth] = value if value.respond_to?(:call)

        h[meth] = instance.public_method(value)
      end
    end
1329526
def ! options = {}
      merged_options = merge_headers_and_queries options
      unless @stubbed
        self.class.send(@method, @path || '/', merged_options)
      else
        uri = "#{self.class.base_uri}#{@path}"

        stub_request(@method.to_sym, uri.to_s).with merged_options
      end
    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
114317
def method_missing(method_symbol, *method_args)
      if method_args.length > 0
        _set(method_symbol, method_args.first)
      end

      _get(method_symbol)
    end
763039
def method_missing(method, *args, &block)
      super
    rescue NoMethodError
      return regs(method) if self.has_reg?(method)
      return ports(method) if self.has_port?(method)
      if method.to_s =~ /=$/
        define_singleton_method(method) do |val|
          instance_variable_set("@#{method.to_s.sub('=', '')}", val)
        end
      else
        define_singleton_method(method) do
          instance_variable_get("@#{method}")
        end
      end
      send(method, *args, &block)
    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
1315896
def length
      (@client.redis.multi do
        %w[ locks work scheduled depends ].each do |suffix|
          @client.redis.zcard("ql:q:#{@name}-#{suffix}")
        end
      end).inject(0, :+)
    end
968188
def method_missing(symbol)
      if hash.key?(symbol)
        hash[symbol]
      elsif hash.key?(symbol.to_s)
        hash[symbol.to_s]
      else
        raise NoMethodError
      end
    end
561832
def method_missing(key, *args, &block)
      if key.to_s =~ /\A(.+)=\z/
        self[$1] = args.first
        return args.first
      end
      if key.to_s =~ /\A(.+)\?\z/
        return !!self[$1]
      end
      return self[key]  if has_key?(key)
      nil
    end
725462
def method_missing(method_name, *args, &block)
      config = Loquacious::Configuration.for method_name, &block
      raise Adhearsion::Configuration::ConfigurationError.new "Invalid plugin #{method_name}" if config.nil?
      config
    end
876770
def create_migration_method_hashes
      # the class => attribute => migration filter hash
      @attr_flt_hash = {}
      customizable_class_attributes.each do |klass, pas|
        flts = migration_filters(klass) || next
        @attr_flt_hash[klass] = flts
      end
      # print the migration shim methods
      unless @mgt_mths.empty? then
        logger.info("Migration shim methods:\n#{@mgt_mths.qp}")
      end
    end
440043
def method_missing(method, *args, &block)
      helpers.send(method, *args, &block)
    rescue NoMethodError
      super
    end
775146
def method_missing(method, *args)
      getter_name = "get_#{method}"
      return send(getter_name, *args) if respond_to?(getter_name)

      if method.to_s =~ /(.*)=$/
        setter_name = "set_#{Regexp.last_match[1]}"
        return send(setter_name, *args) if respond_to?(setter_name)
      end
      super
    end