Class: Hextech::Adapter

Inherits:
Object
  • Object
show all
Includes:
Mixins::ArgumentChecks, Mixins::Callable
Defined in:
lib/hextech/adapter.rb

Instance Method Summary collapse

Methods included from Mixins::Callable

included

Methods included from Mixins::ArgumentChecks

#validate_collection_for

Constructor Details

#initializeAdapter

Returns a new instance of Adapter.



9
10
11
# File 'lib/hextech/adapter.rb', line 9

def initialize
  @connection = Hextech::SendRequest.new(host: host, api_key: api_key)
end

Instance Method Details

#callObject



13
14
15
16
17
# File 'lib/hextech/adapter.rb', line 13

def call
  connection
    .call(path)
    .then { |response| wrap_response(response, response_class) }
end