Module: NBA::DraftCombineDrillResults::ResultAttributes Private

Defined in:
lib/nba/draft_combine_drill_results.rb

Overview

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Extracts result attributes from data

Class Method Summary collapse

Class Method Details

.drills(data) ⇒ Hash

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Extracts drill result attributes from data

Parameters:

  • data (Hash)

    the row data

Returns:

  • (Hash)

    drill result attributes



102
103
104
105
106
107
108
109
# File 'lib/nba/draft_combine_drill_results.rb', line 102

def self.drills(data)
  {standing_vertical_leap: data["STANDING_VERTICAL_LEAP"],
   max_vertical_leap: data["MAX_VERTICAL_LEAP"],
   lane_agility_time: data["LANE_AGILITY_TIME"],
   modified_lane_agility_time: data["MODIFIED_LANE_AGILITY_TIME"],
   three_quarter_sprint: data["THREE_QUARTER_SPRINT"],
   bench_press: data["BENCH_PRESS"]}
end

.extract(data) ⇒ Hash

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Extracts all result attributes from data

Parameters:

  • data (Hash)

    the row data

Returns:

  • (Hash)

    extracted attributes



84
85
86
# File 'lib/nba/draft_combine_drill_results.rb', line 84

def self.extract(data)
  player(data).merge(drills(data))
end

.player(data) ⇒ Hash

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Extracts player attributes from data

Parameters:

  • data (Hash)

    the row data

Returns:

  • (Hash)

    player attributes



92
93
94
95
96
# File 'lib/nba/draft_combine_drill_results.rb', line 92

def self.player(data)
  {temp_player_id: data["TEMP_PLAYER_ID"], player_id: data["PLAYER_ID"],
   first_name: data["FIRST_NAME"], last_name: data["LAST_NAME"],
   player_name: data["PLAYER_NAME"], position: data["POSITION"]}
end