Class: YFantasy::DraftResult
- Inherits:
-
BaseSubresource
- Object
- BaseSubresource
- YFantasy::DraftResult
- Defined in:
- lib/y_fantasy/resources/shared_subresources/draft_result.rb
Overview
Represents a single draft result in a Yahoo Fantasy league
Instance Attribute Summary collapse
-
#pick ⇒ Integer
readonly
The pick number.
-
#player_key ⇒ String
readonly
The unique key for the player drafted.
-
#round ⇒ Integer
readonly
The draft round.
-
#team_key ⇒ String
readonly
The unique key for the drafting team.
Instance Method Summary collapse
-
#player ⇒ Player
Retrieves the Player resource associated with this draft result.
-
#team ⇒ Team
Retrieves the Team resource associated with this draft result.
Methods inherited from BaseSubresource
dependent?, find, resource_name
Methods included from Subresourceable
Instance Attribute Details
#pick ⇒ Integer (readonly)
Returns the pick number.
10 |
# File 'lib/y_fantasy/resources/shared_subresources/draft_result.rb', line 10 option :pick, type: Types::Coercible::Integer |
#player_key ⇒ String (readonly)
Returns the unique key for the player drafted.
18 |
# File 'lib/y_fantasy/resources/shared_subresources/draft_result.rb', line 18 option :player_key |
#round ⇒ Integer (readonly)
Returns the draft round.
14 |
# File 'lib/y_fantasy/resources/shared_subresources/draft_result.rb', line 14 option :round, type: Types::Coercible::Integer |
#team_key ⇒ String (readonly)
Returns the unique key for the drafting team.
22 |
# File 'lib/y_fantasy/resources/shared_subresources/draft_result.rb', line 22 option :team_key |
Instance Method Details
#player ⇒ Player
Retrieves the Player resource associated with this draft result
28 29 30 |
# File 'lib/y_fantasy/resources/shared_subresources/draft_result.rb', line 28 def player self.class.find(:player, player_key) end |
#team ⇒ Team
Retrieves the Team resource associated with this draft result
34 35 36 |
# File 'lib/y_fantasy/resources/shared_subresources/draft_result.rb', line 34 def team self.class.find(:team, team_key) end |