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

#ageFloat

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

#birthdateString

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

#heightString

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_numberString

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

#organizationString

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_typeString

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_pickInteger

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_idInteger

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_nameString

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

#positionString

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_numberInteger

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_pickInteger

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

#seasonString

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_abbreviationString

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_cityString

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_idInteger

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_nameString

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

#weightString

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

#playerPlayer?

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

#teamTeam?

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