class Sorare::Rewards::Build
Build
builds the rewards structure for a given game week
Public Instance Methods
allocate!()
click to toggle source
# File lib/sorare/rewards/interactors/build.rb, line 24 def allocate! Allocations::ComputeForGameWeek.call!( game_week: game_week, supply: game_week_supply, salt: salt ).game_week_allocations end
call()
click to toggle source
# File lib/sorare/rewards/interactors/build.rb, line 13 def call context.card_allocations = allocate! context.prize_pools = prize_pools! context.prize_pool_currency = game_week.config.prize_pool_currency end
game_week_supply()
click to toggle source
# File lib/sorare/rewards/interactors/build.rb, line 19 def game_week_supply @game_week_supply ||= Supply::ComputeForGameWeek.call!(game_week: game_week, salt: salt) .game_week_supply end
prize_pools!()
click to toggle source
# File lib/sorare/rewards/interactors/build.rb, line 30 def prize_pools! PrizePools::ComputeForGameWeek.call!(game_week: game_week, salt: salt).prize_pools end