Class: YFantasy::Group::Settings

Inherits:
BaseSubresource show all
Defined in:
lib/y_fantasy/resources/group/settings.rb

Overview

Settings for a Yahoo NFL Survival Group

Constant Summary collapse

DEADLINE_1_DESC =
"5 minutes before the first game of each week"
DEADLINE_2_DESC =
"Sunday at 1:00 PM EST"

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from BaseSubresource

dependent?, find, resource_name

Methods included from Subresourceable

included

Instance Attribute Details

#commissioner_noteString (readonly)

Returns:

  • (String)


38
# File 'lib/y_fantasy/resources/group/settings.rb', line 38

option :commissioner_note

#deadlineInteger (readonly)

Returns:

  • (Integer)


30
# File 'lib/y_fantasy/resources/group/settings.rb', line 30

option :deadline, type: Types::Coercible::Integer

#end_weekInteger (readonly)

Returns the group end week.

Returns:

  • (Integer)

    the group end week



18
# File 'lib/y_fantasy/resources/group/settings.rb', line 18

option :end_week, type: Types::Coercible::Integer

#max_strikesInteger (readonly)

Returns the total number of strikes (incorrect picks) allowed.

Returns:

  • (Integer)

    the total number of strikes (incorrect picks) allowed



22
# File 'lib/y_fantasy/resources/group/settings.rb', line 22

option :max_strikes, type: Types::Coercible::Integer

#start_weekInteger (readonly)

Returns the group start week.

Returns:

  • (Integer)

    the group start week



14
# File 'lib/y_fantasy/resources/group/settings.rb', line 14

option :start_week, type: Types::Coercible::Integer

#two_pick_start_weekInteger (readonly)

Returns:

  • (Integer)


34
# File 'lib/y_fantasy/resources/group/settings.rb', line 34

option :two_pick_start_week, type: Types::Coercible::Integer

#use_playoff_weeksBoolean (readonly)

Returns whether or not the group uses playoff weeks.

Returns:

  • (Boolean)

    whether or not the group uses playoff weeks



26
# File 'lib/y_fantasy/resources/group/settings.rb', line 26

option :use_playoff_weeks, type: Types::Params::Bool

Instance Method Details

#deadline_descObject

:nocov:



43
44
45
46
47
48
49
# File 'lib/y_fantasy/resources/group/settings.rb', line 43

def deadline_desc
  if deadline == 1
    DEADLINE_1_DESC
  elsif deadline == 2
    DEADLINE_2_DESC
  end
end