Class: Believe::Models::Team
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Believe::Models::Team
- Defined in:
- lib/believe/models/team.rb
Overview
Instance Attribute Summary collapse
-
#annual_budget_gbp ⇒ String?
Annual budget in GBP.
-
#average_attendance ⇒ Float?
Average match attendance.
-
#contact_email ⇒ String?
Team contact email.
-
#culture_score ⇒ Integer
Team culture/morale score (0-100).
-
#founded_year ⇒ Integer
Year the club was founded.
-
#id ⇒ String
Unique identifier.
-
#is_active ⇒ Boolean?
Whether the team is currently active.
-
#league ⇒ Symbol, ::Believe::Models::League
Current league.
-
#name ⇒ String
Team name.
-
#nickname ⇒ String?
Team nickname.
-
#primary_color ⇒ String?
Primary team color (hex).
-
#rival_teams ⇒ Array<String>?
List of rival team IDs.
-
#secondary_color ⇒ String?
Secondary team color (hex).
-
#stadium ⇒ String
Home stadium name.
-
#stadium_location ⇒ ::Believe::Models::GeoLocation?
Geographic coordinates for a location.
-
#values ⇒ ::Believe::Models::TeamValues
Team’s core values.
-
#website ⇒ String?
Official team website.
-
#win_percentage ⇒ Float?
Season win percentage.
Instance Method Summary collapse
-
#initialize(id:, culture_score:, founded_year:, league:, name:, stadium:, values:, annual_budget_gbp: nil, average_attendance: nil, contact_email: nil, is_active: nil, nickname: nil, primary_color: nil, rival_teams: nil, secondary_color: nil, stadium_location: nil, website: nil, win_percentage: nil) ⇒ Object
constructor
Full team 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:, culture_score:, founded_year:, league:, name:, stadium:, values:, annual_budget_gbp: nil, average_attendance: nil, contact_email: nil, is_active: nil, nickname: nil, primary_color: nil, rival_teams: nil, secondary_color: nil, stadium_location: nil, website: nil, win_percentage: nil) ⇒ Object
Full team model with ID.
|
|
# File 'lib/believe/models/team.rb', line 115
|
Instance Attribute Details
#annual_budget_gbp ⇒ String?
Annual budget in GBP
53 |
# File 'lib/believe/models/team.rb', line 53 optional :annual_budget_gbp, String, nil?: true |
#average_attendance ⇒ Float?
Average match attendance
59 |
# File 'lib/believe/models/team.rb', line 59 optional :average_attendance, Float, nil?: true |
#contact_email ⇒ String?
Team contact email
65 |
# File 'lib/believe/models/team.rb', line 65 optional :contact_email, String, nil?: true |
#culture_score ⇒ Integer
Team culture/morale score (0-100)
17 |
# File 'lib/believe/models/team.rb', line 17 required :culture_score, Integer |
#founded_year ⇒ Integer
Year the club was founded
23 |
# File 'lib/believe/models/team.rb', line 23 required :founded_year, Integer |
#id ⇒ String
Unique identifier
11 |
# File 'lib/believe/models/team.rb', line 11 required :id, String |
#is_active ⇒ Boolean?
Whether the team is currently active
71 |
# File 'lib/believe/models/team.rb', line 71 optional :is_active, ::Believe::Internal::Type::Boolean |
#league ⇒ Symbol, ::Believe::Models::League
Current league
29 |
# File 'lib/believe/models/team.rb', line 29 required :league, enum: -> { ::Believe::League } |
#name ⇒ String
Team name
35 |
# File 'lib/believe/models/team.rb', line 35 required :name, String |
#nickname ⇒ String?
Team nickname
77 |
# File 'lib/believe/models/team.rb', line 77 optional :nickname, String, nil?: true |
#primary_color ⇒ String?
Primary team color (hex)
83 |
# File 'lib/believe/models/team.rb', line 83 optional :primary_color, String, nil?: true |
#rival_teams ⇒ Array<String>?
List of rival team IDs
89 |
# File 'lib/believe/models/team.rb', line 89 optional :rival_teams, ::Believe::Internal::Type::ArrayOf[String] |
#secondary_color ⇒ String?
Secondary team color (hex)
95 |
# File 'lib/believe/models/team.rb', line 95 optional :secondary_color, String, nil?: true |
#stadium ⇒ String
Home stadium name
41 |
# File 'lib/believe/models/team.rb', line 41 required :stadium, String |
#stadium_location ⇒ ::Believe::Models::GeoLocation?
Geographic coordinates for a location.
101 |
# File 'lib/believe/models/team.rb', line 101 optional :stadium_location, -> { ::Believe::GeoLocation }, nil?: true |
#values ⇒ ::Believe::Models::TeamValues
Team’s core values
47 |
# File 'lib/believe/models/team.rb', line 47 required :values, -> { ::Believe::TeamValues } |
#website ⇒ String?
Official team website
107 |
# File 'lib/believe/models/team.rb', line 107 optional :website, String, nil?: true |
#win_percentage ⇒ Float?
Season win percentage
113 |
# File 'lib/believe/models/team.rb', line 113 optional :win_percentage, Float, nil?: true |