Class: Sorare::Rewards::PrizePools::ComputeForLeague
- Inherits:
-
Object
- Object
- Sorare::Rewards::PrizePools::ComputeForLeague
- Includes:
- Interactor
- Defined in:
- lib/sorare/rewards/interactors/prize_pools/compute_for_league.rb
Overview
ComputeForLeague computes the prize pools of a league
Instance Method Summary collapse
Instance Method Details
#call ⇒ Object
15 16 17 |
# File 'lib/sorare/rewards/interactors/prize_pools/compute_for_league.rb', line 15 def call context.league_prize_pools = prize_pools! end |
#prize_pools! ⇒ Object
19 20 21 22 23 24 25 26 27 |
# File 'lib/sorare/rewards/interactors/prize_pools/compute_for_league.rb', line 19 def prize_pools! league.each_division_prize_pools.to_h do |division, prize_pools| [ Sorare::Rewards.configuration.transform_division.call(division), ComputeForDivision.call!(playing_rate: league., available_prize_pools: prize_pools) .division_prize_pools ] end end |