Sha256: be65073f3850516ebe0699f74678690d7f8fc8c4807b4f7b2c2c6983245a6642
Contents?: true
Size: 560 Bytes
Versions: 1
Compression:
Stored size: 560 Bytes
Contents
require 'oxford_dictionary/deserialize' module OxfordDictionary module Endpoints # The common functionality (and dependency initialization) of all 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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
oxford_dictionary-3.0.0 | lib/oxford_dictionary/endpoints/endpoint.rb |