Class: Hextech::Global::ActiveShard

Inherits:
Adapter
  • Object
show all
Defined in:
lib/hextech/global/active_shard.rb

Constant Summary collapse

GAMES =
%w[lor val].freeze
REGIONS =
%w[europe americas asia esports].freeze

Instance Method Summary collapse

Methods included from Mixins::Callable

included

Methods included from Mixins::ArgumentChecks

#validate_collection_for

Constructor Details

#initialize(game:, puuid:, region: 'europe') ⇒ ActiveShard

Returns a new instance of ActiveShard.



10
11
12
13
14
15
16
# File 'lib/hextech/global/active_shard.rb', line 10

def initialize(game:, puuid:, region: 'europe')
  @game = game
  @puuid = puuid
  @region = region

  super()
end

Instance Method Details

#callObject



18
19
20
21
22
23
# File 'lib/hextech/global/active_shard.rb', line 18

def call
  validate_collection_for(collection: REGIONS, option: region)
  validate_collection_for(collection: GAMES, option: game)

  super
end