Class: Believe::Models::Match
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Believe::Models::Match
- Defined in:
- lib/believe/models/match.rb
Overview
Instance Attribute Summary collapse
-
#attendance ⇒ Integer?
Match attendance.
-
#away_score ⇒ Integer?
Away team score.
-
#away_team_id ⇒ String
Away team ID.
-
#date ⇒ Time
Match date and time.
-
#episode_id ⇒ String?
Episode ID where this match is featured.
-
#home_score ⇒ Integer?
Home team score.
-
#home_team_id ⇒ String
Home team ID.
-
#id ⇒ String
Unique identifier.
-
#lesson_learned ⇒ String?
The life lesson learned from this match.
-
#match_type ⇒ Symbol, ::Believe::Models::MatchType
Type of match.
-
#possession_percentage ⇒ Float?
Home team possession percentage.
-
#result ⇒ Symbol, ...
Match result from home team perspective.
-
#ted_halftime_speech ⇒ String?
Ted’s inspirational halftime speech.
-
#ticket_revenue_gbp ⇒ String?
Total ticket revenue in GBP.
-
#turning_points ⇒ Array<::Believe::Models::TurningPoint>?
Key moments that changed the match.
-
#weather_temp_celsius ⇒ Float?
Temperature at kickoff in Celsius.
Instance Method Summary collapse
-
#initialize(id:, away_team_id:, date:, home_team_id:, match_type:, attendance: nil, away_score: nil, episode_id: nil, home_score: nil, lesson_learned: nil, possession_percentage: nil, result: nil, ted_halftime_speech: nil, ticket_revenue_gbp: nil, turning_points: nil, weather_temp_celsius: nil) ⇒ Object
constructor
Full match model with ID.
Methods inherited from Internal::Type::BaseModel
==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml
Methods included from Internal::Type::Converter
#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info
Methods included from Internal::Util::SorbetRuntimeSupport
#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type
Constructor Details
#initialize(id:, away_team_id:, date:, home_team_id:, match_type:, attendance: nil, away_score: nil, episode_id: nil, home_score: nil, lesson_learned: nil, possession_percentage: nil, result: nil, ted_halftime_speech: nil, ticket_revenue_gbp: nil, turning_points: nil, weather_temp_celsius: nil) ⇒ Object
Full match model with ID.
|
|
# File 'lib/believe/models/match.rb', line 103
|
Instance Attribute Details
#attendance ⇒ Integer?
Match attendance
41 |
# File 'lib/believe/models/match.rb', line 41 optional :attendance, Integer, nil?: true |
#away_score ⇒ Integer?
Away team score
47 |
# File 'lib/believe/models/match.rb', line 47 optional :away_score, Integer |
#away_team_id ⇒ String
Away team ID
17 |
# File 'lib/believe/models/match.rb', line 17 required :away_team_id, String |
#date ⇒ Time
Match date and time
23 |
# File 'lib/believe/models/match.rb', line 23 required :date, Time |
#episode_id ⇒ String?
Episode ID where this match is featured
53 |
# File 'lib/believe/models/match.rb', line 53 optional :episode_id, String, nil?: true |
#home_score ⇒ Integer?
Home team score
59 |
# File 'lib/believe/models/match.rb', line 59 optional :home_score, Integer |
#home_team_id ⇒ String
Home team ID
29 |
# File 'lib/believe/models/match.rb', line 29 required :home_team_id, String |
#id ⇒ String
Unique identifier
11 |
# File 'lib/believe/models/match.rb', line 11 required :id, String |
#lesson_learned ⇒ String?
The life lesson learned from this match
65 |
# File 'lib/believe/models/match.rb', line 65 optional :lesson_learned, String, nil?: true |
#match_type ⇒ Symbol, ::Believe::Models::MatchType
Type of match
35 |
# File 'lib/believe/models/match.rb', line 35 required :match_type, enum: -> { ::Believe::MatchType } |
#possession_percentage ⇒ Float?
Home team possession percentage
71 |
# File 'lib/believe/models/match.rb', line 71 optional :possession_percentage, Float, nil?: true |
#result ⇒ Symbol, ...
Match result from home team perspective
77 |
# File 'lib/believe/models/match.rb', line 77 optional :result, enum: -> { ::Believe::MatchResult } |
#ted_halftime_speech ⇒ String?
Ted’s inspirational halftime speech
83 |
# File 'lib/believe/models/match.rb', line 83 optional :ted_halftime_speech, String, nil?: true |
#ticket_revenue_gbp ⇒ String?
Total ticket revenue in GBP
89 |
# File 'lib/believe/models/match.rb', line 89 optional :ticket_revenue_gbp, String, nil?: true |
#turning_points ⇒ Array<::Believe::Models::TurningPoint>?
Key moments that changed the match
95 |
# File 'lib/believe/models/match.rb', line 95 optional :turning_points, -> { ::Believe::Internal::Type::ArrayOf[::Believe::TurningPoint] } |
#weather_temp_celsius ⇒ Float?
Temperature at kickoff in Celsius
101 |
# File 'lib/believe/models/match.rb', line 101 optional :weather_temp_celsius, Float, nil?: true |