Class: YFantasy::Player::StatCollection

Inherits:
BaseSubresource show all
Defined in:
lib/y_fantasy/resources/player/stat_collection.rb

Overview

A collection of stats for a player, for a given time period (e.g., season, week).

Instance Attribute Summary collapse

Method Summary

Methods inherited from BaseSubresource

dependent?, find, resource_name

Methods included from Subresourceable

included

Instance Attribute Details

#advanced_statsArray<Stat> (readonly)

Returns advanced stats for this player.

Returns:

  • (Array<Stat>)

    advanced stats for this player



21
# File 'lib/y_fantasy/resources/player/stat_collection.rb', line 21

option :advanced_stats, optional: true, type: array_of(Stat)

#coverage_typeString (readonly)

Returns the type of coverage (e.g., “week”, “season”).

Returns:

  • (String)

    the type of coverage (e.g., “week”, “season”)



11
# File 'lib/y_fantasy/resources/player/stat_collection.rb', line 11

option :coverage_type

#seasonInteger (readonly)

Returns the season for which stats are reported.

Returns:

  • (Integer)

    the season for which stats are reported



25
# File 'lib/y_fantasy/resources/player/stat_collection.rb', line 25

option :season, optional: true, type: Types::Coercible::Integer

#standard_statsArray<Stat> (readonly)

Returns standard stats for this player.

Returns:

  • (Array<Stat>)

    standard stats for this player



15
# File 'lib/y_fantasy/resources/player/stat_collection.rb', line 15

option :standard_stats, type: array_of(Stat)

#weekInteger (readonly)

Returns the week for which stats are reported (nil if coverage_type is “season”).

Returns:

  • (Integer)

    the week for which stats are reported (nil if coverage_type is “season”)



29
# File 'lib/y_fantasy/resources/player/stat_collection.rb', line 29

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