Sha256: ed6f36902ca07b76dadaccb27714b4643f7a78caaef103a3aad6abf7e2b1bbaf

Contents?: true

Size: 492 Bytes

Versions: 1

Compression:

Stored size: 492 Bytes

Contents

# frozen_string_literal: true
require 'addressable/uri'
require 'addressable/template'
require 'excon'
require 'excon/addressable/version'

Excon.defaults[:uri_parser] = Addressable::URI

# :nodoc:
module Excon
  # Addressable addition to Excon.
  #
  module Addressable
    def new(url, params = {})
      if (variables = params.delete(:expand))
        url = ::Addressable::Template.new(url).expand(variables)
      end

      super
    end
  end

  singleton_class.prepend Addressable
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
excon-addressable-0.1.0 lib/excon/addressable.rb