Class: MLB::Player
- Inherits:
-
Shale::Mapper
- Object
- Shale::Mapper
- MLB::Player
- Defined in:
- lib/mlb/player.rb
Overview
Represents an MLB player with biographical and career information
Instance Attribute Summary collapse
-
#active ⇒ Boolean
(also: #active?)
Returns whether the player is currently active.
-
#bat_side ⇒ Handedness
Returns the player’s batting side.
-
#birth_city ⇒ String
Returns the player’s birth city.
-
#birth_country ⇒ String
Returns the player’s birth country.
-
#birth_date ⇒ Date
Returns the player’s date of birth.
-
#birth_state_province ⇒ String
Returns the player’s birth state or province.
-
#boxscore_name ⇒ String
Returns the player’s name as displayed in boxscores.
-
#current_age ⇒ Integer
Returns the player’s current age.
-
#current_team ⇒ Team
Returns the player’s current team.
-
#draft_year ⇒ Integer
Returns the year the player was drafted.
-
#first_name ⇒ String
Returns the player’s first name.
-
#full_name ⇒ String
Returns the player’s full name.
-
#gender ⇒ String
Returns the player’s gender.
-
#height ⇒ String
Returns the player’s height.
-
#id ⇒ Integer
Returns the unique identifier for the player.
-
#is_player ⇒ Boolean
(also: #player?)
Returns whether the person is a player.
-
#is_verified ⇒ Boolean
(also: #verified?)
Returns whether the player’s information is verified.
-
#last_name ⇒ String
Returns the player’s last name.
-
#link ⇒ String
Returns the API link for the player.
-
#middle_name ⇒ String
Returns the player’s middle name.
-
#mlb_debut_date ⇒ Date
Returns the date of the player’s MLB debut.
-
#pitch_hand ⇒ Handedness
Returns the player’s pitching hand.
-
#primary_number ⇒ Integer
Returns the player’s primary jersey number.
-
#primary_position ⇒ Position
Returns the player’s primary position.
-
#use_name ⇒ String
Returns the player’s preferred name.
-
#weight ⇒ Integer
Returns the player’s weight in pounds.
Instance Attribute Details
#active ⇒ Boolean Also known as: active?
Returns whether the player is currently active
122 |
# File 'lib/mlb/player.rb', line 122 attribute :active, Shale::Type::Boolean |
#bat_side ⇒ Handedness
Returns the player’s batting side
210 |
# File 'lib/mlb/player.rb', line 210 attribute :bat_side, Handedness |
#birth_city ⇒ String
Returns the player’s birth city
82 |
# File 'lib/mlb/player.rb', line 82 attribute :birth_city, Shale::Type::String |
#birth_country ⇒ String
Returns the player’s birth country
98 |
# File 'lib/mlb/player.rb', line 98 attribute :birth_country, Shale::Type::String |
#birth_date ⇒ Date
Returns the player’s date of birth
66 |
# File 'lib/mlb/player.rb', line 66 attribute :birth_date, Shale::Type::Date |
#birth_state_province ⇒ String
Returns the player’s birth state or province
90 |
# File 'lib/mlb/player.rb', line 90 attribute :birth_state_province, Shale::Type::String |
#boxscore_name ⇒ String
Returns the player’s name as displayed in boxscores
162 |
# File 'lib/mlb/player.rb', line 162 attribute :boxscore_name, Shale::Type::String |
#current_age ⇒ Integer
Returns the player’s current age
74 |
# File 'lib/mlb/player.rb', line 74 attribute :current_age, Shale::Type::Integer |
#current_team ⇒ Team
Returns the player’s current team
130 |
# File 'lib/mlb/player.rb', line 130 attribute :current_team, Team |
#draft_year ⇒ Integer
Returns the year the player was drafted
194 |
# File 'lib/mlb/player.rb', line 194 attribute :draft_year, Shale::Type::Integer |
#first_name ⇒ String
Returns the player’s first name
42 |
# File 'lib/mlb/player.rb', line 42 attribute :first_name, Shale::Type::String |
#full_name ⇒ String
Returns the player’s full name
26 |
# File 'lib/mlb/player.rb', line 26 attribute :full_name, Shale::Type::String |
#gender ⇒ String
Returns the player’s gender
170 |
# File 'lib/mlb/player.rb', line 170 attribute :gender, Shale::Type::String |
#height ⇒ String
Returns the player’s height
106 |
# File 'lib/mlb/player.rb', line 106 attribute :height, Shale::Type::String |
#id ⇒ Integer
Returns the unique identifier for the player
18 |
# File 'lib/mlb/player.rb', line 18 attribute :id, Shale::Type::Integer |
#is_player ⇒ Boolean Also known as: player?
Returns whether the person is a player
178 |
# File 'lib/mlb/player.rb', line 178 attribute :is_player, Shale::Type::Boolean |
#is_verified ⇒ Boolean Also known as: verified?
Returns whether the player’s information is verified
186 |
# File 'lib/mlb/player.rb', line 186 attribute :is_verified, Shale::Type::Boolean |
#last_name ⇒ String
Returns the player’s last name
50 |
# File 'lib/mlb/player.rb', line 50 attribute :last_name, Shale::Type::String |
#link ⇒ String
Returns the API link for the player
34 |
# File 'lib/mlb/player.rb', line 34 attribute :link, Shale::Type::String |
#middle_name ⇒ String
Returns the player’s middle name
154 |
# File 'lib/mlb/player.rb', line 154 attribute :middle_name, Shale::Type::String |
#mlb_debut_date ⇒ Date
Returns the date of the player’s MLB debut
202 |
# File 'lib/mlb/player.rb', line 202 attribute :mlb_debut_date, Shale::Type::Date |
#pitch_hand ⇒ Handedness
Returns the player’s pitching hand
218 |
# File 'lib/mlb/player.rb', line 218 attribute :pitch_hand, Handedness |
#primary_number ⇒ Integer
Returns the player’s primary jersey number
58 |
# File 'lib/mlb/player.rb', line 58 attribute :primary_number, Shale::Type::Integer |
#primary_position ⇒ Position
Returns the player’s primary position
138 |
# File 'lib/mlb/player.rb', line 138 attribute :primary_position, Position |
#use_name ⇒ String
Returns the player’s preferred name
146 |
# File 'lib/mlb/player.rb', line 146 attribute :use_name, Shale::Type::String |
#weight ⇒ Integer
Returns the player’s weight in pounds
114 |
# File 'lib/mlb/player.rb', line 114 attribute :weight, Shale::Type::Integer |