Class: NBA::League

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

Overview

Represents a basketball league

Constant Summary collapse

NBA =

NBA league ID

"00".freeze
WNBA =

WNBA league ID

"10".freeze
G_LEAGUE =

G League (NBA Development League) ID

"20".freeze

Instance Attribute Summary collapse

Instance Attribute Details

#idString

Returns the unique identifier for the league

Examples:

league.id #=> "00"


27
# File 'lib/nba/league.rb', line 27

attribute :id, Shale::Type::String

#nameString

Returns the name of the league

Examples:

league.name #=> "NBA"


35
# File 'lib/nba/league.rb', line 35

attribute :name, Shale::Type::String