Class: AnyQuery::Adapters::Http::Config Private

Inherits:
Base::Config show all
Defined in:
lib/any_query/adapters/http.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Instance Method Summary collapse

Methods inherited from Base::Config

#initialize, #primary_key, #url

Constructor Details

This class inherits a constructor from AnyQuery::Adapters::Base::Config

Instance Method Details

#endpoint(name, method, path, options = {}) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



10
11
12
13
# File 'lib/any_query/adapters/http.rb', line 10

def endpoint(name, method, path, options = {})
  @endpoints ||= {}
  @endpoints[name] = { method:, path:, options: }
end

#to_hObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



15
16
17
18
19
20
21
22
# File 'lib/any_query/adapters/http.rb', line 15

def to_h
  {
    url: @url,
    primary_key: @primary_key,
    wrapper: @wrapper,
    endpoints: @endpoints
  }
end