Class: MLB::StandingsRecord
- Inherits:
-
Shale::Mapper
- Object
- Shale::Mapper
- MLB::StandingsRecord
- Defined in:
- lib/mlb/standings_record.rb
Overview
Represents a standings record for a division
Constant Summary collapse
- STANDINGS_REGULAR_SEASON =
"regularSeason".freeze
- STANDINGS_WILD_CARD =
"wildCard".freeze
- STANDINGS_DIVISION_LEADERS =
"divisionLeaders".freeze
- STANDINGS_WILD_CARD_WITH_LEADERS =
"wildCardWithLeaders".freeze
- STANDINGS_FIRST_HALF =
"firstHalf".freeze
- STANDINGS_SECOND_HALF =
"secondHalf".freeze
- STANDINGS_SPRING_TRAINING =
"springTraining".freeze
- STANDINGS_POSTSEASON =
"postseason".freeze
Instance Attribute Summary collapse
-
#division ⇒ Division
Returns the division.
-
#last_updated ⇒ String
Returns when the standings were last updated.
-
#league ⇒ League
Returns the league.
-
#sport ⇒ Sport
Returns the sport.
-
#standings_type ⇒ String
Returns the standings type.
-
#team_records ⇒ Array<TeamRecord>
Returns the team records.
Instance Method Summary collapse
-
#postseason? ⇒ Boolean
Returns whether this is postseason standings.
-
#regular_season? ⇒ Boolean
Returns whether this is regular season standings.
-
#spring_training? ⇒ Boolean
Returns whether this is spring training standings.
-
#wild_card? ⇒ Boolean
Returns whether this is wild card standings.
Instance Attribute Details
#division ⇒ Division
Returns the division
41 |
# File 'lib/mlb/standings_record.rb', line 41 attribute :division, Division |
#last_updated ⇒ String
Returns when the standings were last updated
57 |
# File 'lib/mlb/standings_record.rb', line 57 attribute :last_updated, Shale::Type::String |
#league ⇒ League
Returns the league
33 |
# File 'lib/mlb/standings_record.rb', line 33 attribute :league, League |
#sport ⇒ Sport
Returns the sport
49 |
# File 'lib/mlb/standings_record.rb', line 49 attribute :sport, Sport |
#standings_type ⇒ String
Returns the standings type
25 |
# File 'lib/mlb/standings_record.rb', line 25 attribute :standings_type, Shale::Type::String |
#team_records ⇒ Array<TeamRecord>
Returns the team records
65 |
# File 'lib/mlb/standings_record.rb', line 65 attribute :team_records, TeamRecord, collection: true |
Instance Method Details
#postseason? ⇒ Boolean
Returns whether this is postseason standings
97 |
# File 'lib/mlb/standings_record.rb', line 97 def postseason? = standings_type.eql?(STANDINGS_POSTSEASON) |
#regular_season? ⇒ Boolean
Returns whether this is regular season standings
73 |
# File 'lib/mlb/standings_record.rb', line 73 def regular_season? = standings_type.eql?(STANDINGS_REGULAR_SEASON) |
#spring_training? ⇒ Boolean
Returns whether this is spring training standings
89 |
# File 'lib/mlb/standings_record.rb', line 89 def spring_training? = standings_type.eql?(STANDINGS_SPRING_TRAINING) |
#wild_card? ⇒ Boolean
Returns whether this is wild card standings
81 |
# File 'lib/mlb/standings_record.rb', line 81 def wild_card? = standings_type.eql?(STANDINGS_WILD_CARD) |