Sha256: 7c1fab62efd2c90f8fcd74927626703e6a4087fabd570e56fe1ddcc708b3b706

Contents?: true

Size: 377 Bytes

Versions: 8

Compression:

Stored size: 377 Bytes

Contents

module SmartyStreets
  class URLPrefixSender
    def initialize(url_prefix, inner)
      @url_prefix = url_prefix
      @inner = inner
    end

    def send(request)
      if request.url_components.nil?
        request.url_prefix = @url_prefix
      else
        request.url_prefix = @url_prefix + request.url_components
      end

      @inner.send(request)
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
smartystreets_ruby_sdk-5.20.6 lib/smartystreets_ruby_sdk/url_prefix_sender.rb
smartystreets_ruby_sdk-5.20.4 lib/smartystreets_ruby_sdk/url_prefix_sender.rb
smartystreets_ruby_sdk-5.20.3 lib/smartystreets_ruby_sdk/url_prefix_sender.rb
smartystreets_ruby_sdk-5.20.2 lib/smartystreets_ruby_sdk/url_prefix_sender.rb
smartystreets_ruby_sdk-5.19.0 lib/smartystreets_ruby_sdk/url_prefix_sender.rb
smartystreets_ruby_sdk-5.18.1 lib/smartystreets_ruby_sdk/url_prefix_sender.rb
smartystreets_ruby_sdk-5.18.0 lib/smartystreets_ruby_sdk/url_prefix_sender.rb
smartystreets_ruby_sdk-5.17.2 lib/smartystreets_ruby_sdk/url_prefix_sender.rb