class Sorare::Rewards::Pick
Pick
the rewards for a given game week Receive a Game Week reward supply data And a reward allocations
{ 'global-all_star' => { 'rare' => { 'D1' => { 'tier_0' => 0, 'tier_1' => 1 } } } }
Public Instance Methods
call()
click to toggle source
Depending on the way the allocations interpreter is implemented it could be done by him or we update the allocations process to match the structure
# File lib/sorare/rewards/interactors/pick.rb, line 26 def call context.cards_picked = Sorare::Rewards::Cards::PickForGameWeek.call!( **context.to_h, salt: salt, allocations: transposed_allocations ).cards_picked end
transposed_allocations()
click to toggle source
# File lib/sorare/rewards/interactors/pick.rb, line 34 def transposed_allocations Sorare::Rewards::GameWeekAllocations.new(Transposer.transpose_allocations(card_allocations)) end