class OxfordDictionary::Endpoints::Endpoint
The common functionality (and dependency initialization) of all endpoints
Public Class Methods
new(request_client:)
click to toggle source
# File lib/oxford_dictionary/endpoints/endpoint.rb, line 7 def initialize(request_client:) @request_client = request_client end
Private Instance Methods
deserialize()
click to toggle source
# File lib/oxford_dictionary/endpoints/endpoint.rb, line 13 def deserialize @deserialize ||= OxfordDictionary::Deserialize.new end
request_uri(path:, params:)
click to toggle source
# File lib/oxford_dictionary/endpoints/endpoint.rb, line 17 def request_uri(path:, params:) URI(path).tap do |uri| uri.query = URI.encode_www_form(params) unless params.empty? end end