Class: Hextech::Adapter
- Inherits:
-
Object
- Object
- Hextech::Adapter
- Includes:
- Mixins::ArgumentChecks, Mixins::Callable
- Defined in:
- lib/hextech/adapter.rb
Direct Known Subclasses
Global::Account::Base, Global::ActiveShard, League::ChampionRotation, League::Champions, League::Clash::Base, League::Mastery::Base, League::Match::Base, League::Patches, League::Spectator::Base, League::Status, League::Summoner::Base, League::ThirdPartyCode, Valorant::Status
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize ⇒ Adapter
constructor
A new instance of Adapter.
Methods included from Mixins::Callable
Methods included from Mixins::ArgumentChecks
Constructor Details
#initialize ⇒ Adapter
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
#call ⇒ Object
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 |