Module: NBA::DraftCombineSpotShooting::ResultAttributes Private

Defined in:
lib/nba/draft_combine_spot_shooting.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

API:

  • private

Class Method Summary collapse

Class Method Details

.college_range(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 college range shot attributes from data

Parameters:

  • the row data

Returns:

  • college range shot attributes

API:

  • private



110
111
112
# File 'lib/nba/draft_combine_spot_shooting.rb', line 110

def self.college_range(data)
  CollegeRange.corners(data).merge(CollegeRange.breaks(data)).merge(CollegeRange.top(data))
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:

  • the row data

Returns:

  • extracted attributes

API:

  • private



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

def self.extract(data)
  player(data).merge(fifteen_foot(data)).merge(college_range(data)).merge(nba_range(data))
end

.fifteen_foot(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 fifteen-foot range shot attributes from data

Parameters:

  • the row data

Returns:

  • fifteen-foot range shot attributes

API:

  • private



102
103
104
# File 'lib/nba/draft_combine_spot_shooting.rb', line 102

def self.fifteen_foot(data)
  FifteenFoot.corners(data).merge(FifteenFoot.breaks(data)).merge(FifteenFoot.top(data))
end

.nba_range(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 NBA range shot attributes from data

Parameters:

  • the row data

Returns:

  • NBA range shot attributes

API:

  • private



118
119
120
# File 'lib/nba/draft_combine_spot_shooting.rb', line 118

def self.nba_range(data)
  NbaRange.corners(data).merge(NbaRange.breaks(data)).merge(NbaRange.top(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:

  • the row data

Returns:

  • player attributes

API:

  • private



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

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