Class: NBA::DraftBoardPick

Inherits:
Shale::Mapper
  • Object
show all
Defined in:
lib/nba/draft_board_pick.rb

Overview

Represents a draft board pick

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#age ⇒ Float

Returns the player age

Examples:

pick.age #=> 19.0

Returns:

  • (Float) —

    the age



151
# File 'lib/nba/draft_board_pick.rb', line 151

attribute :age, Shale::Type::Float

#birthdate ⇒ String

Returns the birthdate

Examples:

pick.birthdate #=> "2004-01-04"

Returns:

  • (String) —

    the birthdate



143
# File 'lib/nba/draft_board_pick.rb', line 143

attribute :birthdate, Shale::Type::String

#height ⇒ String

Returns the player height

Examples:

pick.height #=> "7-4"

Returns:

  • (String) —

    the height



111
# File 'lib/nba/draft_board_pick.rb', line 111

attribute :height, Shale::Type::String

#jersey_number ⇒ String

Returns the jersey number

Examples:

pick.jersey_number #=> "1"

Returns:

  • (String) —

    the jersey number



135
# File 'lib/nba/draft_board_pick.rb', line 135

attribute :jersey_number, Shale::Type::String

#organization ⇒ String

Returns the organization name

Examples:

pick.organization #=> "Metropolitans 92"

Returns:

  • (String) —

    the organization



95
# File 'lib/nba/draft_board_pick.rb', line 95

attribute :organization, Shale::Type::String

#organization_type ⇒ String

Returns the organization type

Examples:

pick.organization_type #=> "International"

Returns:

  • (String) —

    the organization type



103
# File 'lib/nba/draft_board_pick.rb', line 103

attribute :organization_type, Shale::Type::String

#overall_pick ⇒ Integer

Returns the overall pick number

Examples:

pick.overall_pick #=> 1

Returns:

  • (Integer) —

    the overall pick



55
# File 'lib/nba/draft_board_pick.rb', line 55

attribute :overall_pick, Shale::Type::Integer

#person_id ⇒ Integer

Returns the person ID

Examples:

pick.person_id #=> 1630162

Returns:

  • (Integer) —

    the person ID



15
# File 'lib/nba/draft_board_pick.rb', line 15

attribute :person_id, Shale::Type::Integer

#player_name ⇒ String

Returns the player name

Examples:

pick.player_name #=> "Victor Wembanyama"

Returns:

  • (String) —

    the player name



23
# File 'lib/nba/draft_board_pick.rb', line 23

attribute :player_name, Shale::Type::String

#position ⇒ String

Returns the player position

Examples:

pick.position #=> "C"

Returns:

  • (String) —

    the position



127
# File 'lib/nba/draft_board_pick.rb', line 127

attribute :position, Shale::Type::String

#round_number ⇒ Integer

Returns the draft round number

Examples:

pick.round_number #=> 1

Returns:

  • (Integer) —

    the round number



39
# File 'lib/nba/draft_board_pick.rb', line 39

attribute :round_number, Shale::Type::Integer

#round_pick ⇒ Integer

Returns the pick number in the round

Examples:

pick.round_pick #=> 1

Returns:

  • (Integer) —

    the round pick



47
# File 'lib/nba/draft_board_pick.rb', line 47

attribute :round_pick, Shale::Type::Integer

#season ⇒ String

Returns the draft season

Examples:

pick.season #=> "2023"

Returns:

  • (String) —

    the season



31
# File 'lib/nba/draft_board_pick.rb', line 31

attribute :season, Shale::Type::String

#team_abbreviation ⇒ String

Returns the team abbreviation

Examples:

pick.team_abbreviation #=> "SAS"

Returns:

  • (String) —

    the team abbreviation



87
# File 'lib/nba/draft_board_pick.rb', line 87

attribute :team_abbreviation, Shale::Type::String

#team_city ⇒ String

Returns the team city

Examples:

pick.team_city #=> "San Antonio"

Returns:

  • (String) —

    the team city



71
# File 'lib/nba/draft_board_pick.rb', line 71

attribute :team_city, Shale::Type::String

#team_id ⇒ Integer

Returns the team ID

Examples:

pick.team_id #=> 1610612759

Returns:

  • (Integer) —

    the team ID



63
# File 'lib/nba/draft_board_pick.rb', line 63

attribute :team_id, Shale::Type::Integer

#team_name ⇒ String

Returns the team name

Examples:

pick.team_name #=> "Spurs"

Returns:

  • (String) —

    the team name



79
# File 'lib/nba/draft_board_pick.rb', line 79

attribute :team_name, Shale::Type::String

#weight ⇒ String

Returns the player weight

Examples:

pick.weight #=> "210"

Returns:

  • (String) —

    the weight



119
# File 'lib/nba/draft_board_pick.rb', line 119

attribute :weight, Shale::Type::String

Instance Method Details

#player ⇒ Player?

Returns the player object

Examples:

pick.player #=> #<NBA::Player>

Returns:

  • (Player, nil) —

    the player object



159
160
161
# File 'lib/nba/draft_board_pick.rb', line 159

def player
  Players.find(person_id)
end

#team ⇒ Team?

Returns the team object

Examples:

pick.team #=> #<NBA::Team>

Returns:

  • (Team, nil) —

    the team object



169
170
171
# File 'lib/nba/draft_board_pick.rb', line 169

def team
  Teams.find(team_id)
end