Sha256: deb9706c2967aa166946ab545ba5e9ca6c8eed29fef85c6cbddd367d8ac3f033

Contents?: true

Size: 386 Bytes

Versions: 17

Compression:

Stored size: 386 Bytes

Contents

# frozen_string_literal: true

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

    def method_missing(m, *args, &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

17 entries across 17 versions & 1 rubygems

Version Path
httpx-0.7.0 lib/httpx/resolver/options.rb
httpx-0.6.7 lib/httpx/resolver/options.rb
httpx-0.6.6 lib/httpx/resolver/options.rb
httpx-0.6.5 lib/httpx/resolver/options.rb
httpx-0.6.4 lib/httpx/resolver/options.rb
httpx-0.6.3 lib/httpx/resolver/options.rb
httpx-0.6.2 lib/httpx/resolver/options.rb
httpx-0.6.1 lib/httpx/resolver/options.rb
httpx-0.6.0 lib/httpx/resolver/options.rb
httpx-0.5.1 lib/httpx/resolver/options.rb
httpx-0.5.0 lib/httpx/resolver/options.rb
httpx-0.4.1 lib/httpx/resolver/options.rb
httpx-0.4.0 lib/httpx/resolver/options.rb
httpx-0.3.1 lib/httpx/resolver/options.rb
httpx-0.3.0 lib/httpx/resolver/options.rb
httpx-0.2.1 lib/httpx/resolver/options.rb
httpx-0.2.0 lib/httpx/resolver/options.rb