Module: Sorare::Rewards
- Defined in:
- lib/sorare/rewards.rb,
lib/sorare/rewards/league.rb,
lib/sorare/rewards/player.rb,
lib/sorare/rewards/random.rb,
lib/sorare/rewards/version.rb,
lib/sorare/rewards/game_week.rb,
lib/sorare/rewards/interactor.rb,
lib/sorare/rewards/transposer.rb,
lib/sorare/rewards/card_picker.rb,
lib/sorare/rewards/flat_picker.rb,
lib/sorare/rewards/configuration.rb,
lib/sorare/rewards/game_week_config.rb,
lib/sorare/rewards/interactors/pick.rb,
lib/sorare/rewards/game_week_rewards.rb,
lib/sorare/rewards/interactors/build.rb,
lib/sorare/rewards/game_week_allocations.rb,
lib/sorare/rewards/interactors/tiers/qualify_supply.rb,
lib/sorare/rewards/interactors/cards/pick_for_league.rb,
lib/sorare/rewards/interactors/tiers/qualify_players.rb,
lib/sorare/rewards/interactors/cards/pick_for_division.rb,
lib/sorare/rewards/interactors/cards/pick_for_game_week.rb,
lib/sorare/rewards/interactors/supply/compute_for_rarity.rb,
lib/sorare/rewards/interactors/supply/compute_for_quality.rb,
lib/sorare/rewards/interactors/concerns/with_picker_options.rb,
lib/sorare/rewards/interactors/supply/compute_for_game_week.rb,
lib/sorare/rewards/interactors/allocations/compute_for_league.rb,
lib/sorare/rewards/interactors/allocations/compute_for_rarity.rb,
lib/sorare/rewards/interactors/prize_pools/compute_for_league.rb,
lib/sorare/rewards/interactors/allocations/compute_for_quality.rb,
lib/sorare/rewards/interactors/prize_pools/compute_for_division.rb,
lib/sorare/rewards/interactors/allocations/compute_for_game_week.rb,
lib/sorare/rewards/interactors/prize_pools/compute_for_game_week.rb,
lib/sorare/rewards/interactors/cards/pick_for_division_and_rarity.rb,
lib/sorare/rewards/interactors/cards/pick_for_division_rarity_and_quality.rb
Overview
Defined Under Namespace
Modules: Allocations, Cards, Interactor, PrizePools, Supply, Tiers, Transposer, WithPickerOptions
Classes: Build, CardPicker, Configuration, FlatPicker, GameWeek, GameWeekAllocations, GameWeekConfig, GameWeekRewards, League, Pick, Player, Random
Constant Summary
collapse
- VERSION =
'1.6.1'
Class Method Summary
collapse
Class Method Details
.configuration ⇒ Object
14
15
16
|
# File 'lib/sorare/rewards.rb', line 14
def configuration
@configuration ||= Configuration.new
end
|
18
19
20
|
# File 'lib/sorare/rewards.rb', line 18
def configure
yield(configuration)
end
|
.pick(salt:, hash: nil, data: nil) ⇒ Object
23
24
25
26
|
# File 'lib/sorare/rewards.rb', line 23
def self.pick(salt:, hash: nil, data: nil)
allocation_ctx = Sorare::Rewards::Build.call!(data: data || game_week_data(hash), salt: salt)
Sorare::Rewards::Pick.call!(allocation_ctx.to_h).picks
end
|