Sha256: 6261fd8ceb11f2d9229b65be0a468b0493a0eff2e80b5aa6dac4de0940fbbd05

Contents?: true

Size: 385 Bytes

Versions: 5

Compression:

Stored size: 385 Bytes

Contents

# frozen_string_literal: true

module HTTPX
  class Resolver::Options
    def initialize(options = {})
      @options = options
    end

    def method_missing(m, *, &block)
      if @options.key?(m)
        @options[m]
      else
        super
      end
    end

    def respond_to_missing?(m, *)
      @options.key?(m) || super
    end

    def to_h
      @options
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
httpx-0.10.0 lib/httpx/resolver/options.rb
httpx-0.9.0 lib/httpx/resolver/options.rb
httpx-0.8.2 lib/httpx/resolver/options.rb
httpx-0.8.1 lib/httpx/resolver/options.rb
httpx-0.8.0 lib/httpx/resolver/options.rb