Sha256: b5050cf5915d4bc82a4e6d35d6b5d9cf67b97c05ae751a50519bdb3a0ff20870

Contents?: true

Size: 480 Bytes

Versions: 3

Compression:

Stored size: 480 Bytes

Contents

require 'oxford_dictionary/deserialize'

module OxfordDictionary
  module Endpoints
    class Endpoint
      def initialize(request_client:)
        @request_client = request_client
      end

      private

      def deserialize
        @deserialize ||= OxfordDictionary::Deserialize.new
      end

      def request_uri(path:, params:)
        URI(path).tap do |uri|
          uri.query = URI.encode_www_form(params) unless params.empty?
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
oxford_dictionary-2.0.1 lib/oxford_dictionary/endpoints/endpoint.rb
oxford_dictionary-2.0.0 lib/oxford_dictionary/endpoints/endpoint.rb
oxford_dictionary-1.3.1 lib/oxford_dictionary/endpoints/endpoint.rb