Class: YFantasy::PickemTeam::WeekPick

Inherits:
BaseSubresource show all
Defined in:
lib/y_fantasy/resources/pickem_team/week_pick.rb

Overview

Represents a single week of picks for a team in a Yahoo Fantasy NFL Survival Group. There may be multiple picks per week.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from BaseSubresource

dependent?, find, resource_name

Methods included from Subresourceable

included

Instance Attribute Details

#picksArray<Pick> (readonly)

Returns the picks made for this week.

Returns:

  • (Array<Pick>)

    the picks made for this week



20
# File 'lib/y_fantasy/resources/pickem_team/week_pick.rb', line 20

option :picks, type: array_of(Pick)

#picks_completedInteger (readonly)

Returns the number of picks completed for this week.

Returns:

  • (Integer)

    the number of picks completed for this week



16
# File 'lib/y_fantasy/resources/pickem_team/week_pick.rb', line 16

option :picks_completed, type: Types::Coercible::Integer

#weekInteger (readonly)

Returns the week number.

Returns:

  • (Integer)

    the week number



12
# File 'lib/y_fantasy/resources/pickem_team/week_pick.rb', line 12

option :week, type: Types::Coercible::Integer

Instance Method Details

#pick_detailsArray<Hash>

Returns team details for each pick.

Returns:

  • (Array<Hash>)

    team details for each pick



23
24
25
# File 'lib/y_fantasy/resources/pickem_team/week_pick.rb', line 23

def pick_details
  picks.compact.map(&:team_details)
end