class SleeperRb::Resources::TradedPick
Represents a traded draft pick for any season of the League
.
Attributes
draft[R]
league[R]
owner_id[R]
previous_owner_id[R]
roster_id[R]
round[R]
season[R]
Public Instance Methods
current_roster()
click to toggle source
The roster which currently owns this pick.
@return [:Resources::League::Roster]
# File lib/sleeper_rb/resources/traded_pick.rb, line 58 cached_association :current_roster do league.rosters.detect { |roster| roster.roster_id == owner_id } end
original_roster()
click to toggle source
The roster which originally owned this pick.
@return [:Resources::League::Roster]
# File lib/sleeper_rb/resources/traded_pick.rb, line 40 cached_association :original_roster do league.rosters.detect { |roster| roster.roster_id == roster_id } end
previous_roster()
click to toggle source
The last roster to have owned this pick before the current one (can be same as original_roster
).
@return [:Resources::League::Roster]
# File lib/sleeper_rb/resources/traded_pick.rb, line 49 cached_association :previous_roster do league.rosters.detect { |roster| roster.roster_id == previous_owner_id } end