rubocop:enable Metrics/MethodLength
503670
def parse_response(response:, params: nil, body: {})
      if response.code < 299
        body[:data] = parse_json(response.body)
        body[:success] = true
      else
        error = write_error_message(response)
        body[:error] = error
        body[:success] = false
      end
      body[:code] = response.code
      body.merge!(raw: { body: response.body, params: params })
    end
981952
def method_missing(meth, *args, &block)
      # Check to see if it can be evaluated
      if(matches? meth)
        #Defines the method and caches it to the class
        self.class.send(:define_method, meth) do
          # Splits the method and parameter. See formatize and directionize
          send directionize(meth).to_sym, formatize(meth)
        end
        # calls the method
        send meth, *args, &block
      else
        super
      end
    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
1121535
def method_missing(name, *args, &block)
      if self.class.resources.keys.include?(name)
        resources[name] ||= self.class.resources[name].new(self)
        resources[name]
      else
        super
      end
    end
327702
def method_missing(method, *args, &block)
      raise ArgumentError.new("wrong number of arguments (#{args.size} for 1)") if args.size != 1
      raise NoMethodError.new("Undefined translation method #{method}") unless MapMethods.respond_to?(method)
      @maps << {name: method, field: args[0], block: block}
    end
924015
def method_missing(method, *args, &block)
      instance_variable = instance_variablize(method)
      if respond_to_missing?(method) and instance_variable_defined?(instance_variable)
        self.class.send :attr_reader, method.to_sym
        instance_variable_get instance_variable
      else
        super
      end
    end
1226109
def method_missing(method)
      method = method.to_s
      raise NoMethodError, "No such method: #{method}" unless @args.keys.include? method
      @args[method]
    end
700577
def method_missing(id_or_class, *args, &block)
      if id_or_class.to_s =~ /(.*)!$/
        @attrs[:id] = $1
      else
        id = id_or_class
        @attrs[:class] = @attrs[:class] ? "#{@attrs[:class]} #{id}".strip : id
      end

      unless args.empty?
        if args.last.respond_to? :to_hash
          @attrs.merge! args.pop.to_hash
        end
      end

      args.push(@attrs)

      while @stream.length > @original_stream_length
        @stream.pop
      end

      if block
        @builder.tag! @sym, *args, &block
      else
        @builder.tag! @sym, *args
      end

      self
    end
855874
def wrap(error, method, path, params, request, response)

      class << error; attr_accessor :_details; end
      error._details = ErrorDetails.new(method, path, params, request, response)

      error
    end
1232820
def method_missing(name, *args, &block)
      return attributes[name.to_sym] if attributes.include?(name.to_sym)
      return super
    end
684526
def method_missing meth, *args, &block
      meth_s = meth.to_s
      if @method && meth_s =~ API_REGEX

        if meth_s.end_with?('!')
          # `foo! bar' is syntactic sugar for `foo.! bar'
          self[meth_s[0...-1]].!(args[0] || {})

        else
          # chain the method name onto URL path
          self[meth_s]
        end
      else
        super
      end
    end
895522
def method_missing(meth, *args, &block)
      if args.size == 1 and meth =~ /^(.+)=$/
        self[$1.to_sym] = args[0]
      else
        super meth, *args, &block
      end
    end
631217
def method_missing(attr_name)
      member_sym = attr_name.id2name.to_sym
      self[member_sym]
    rescue ArgumentError # `member_sym` field doesn't exist.
      raise(NoMethodError.new("undefined method '#{attr_name}' for #{self}"))
    end
546488
def method_missing(method, *args, **kwrest, &proc)
      method_name = method.to_s
      case
      when method_name.start_with?('on')
        event_name = method_name[(method_name[2] == '_' ? 3 : 2)..method_name.size]
        add_event(event_name.to_sym, *args, **kwrest, &proc)
      when method_name.start_with?('filter')
        event_name = method_name[(method_name[6] == '_' ? 7 : 6)..method_name.size]
        add_event_filter(event_name.to_sym, **kwrest, &proc)
      end
    end
846125
def method_missing(name, *args)
      value = @values[name]
      if value.nil? && !@values.has_key?(name)
        address = "<#{self.class.name}:0x00#{(self.object_id << 1).to_s(16)}>"
        raise NoMethodError.new("undefined method `#{name}' for ##{address}")
      end
      value
    end
201751
def log(method_list)
      method_list = Array[method_list]
      method_list.each do |method|
        backup_name = "#{method}_bak".to_sym
        alias_method :backup_name, :method
        define_method(method) do |*args|
          Display.debug("##{method}: ")
          Display.debug(args.inspect)
        end
      end
    end
774241
def method_missing(m, *args, &block)
      if m.to_s =~ /^with_(.+)$/
        with($1.to_sym => args.first)
        self
      else
        super
      end
    end