Class: Sports::Group

Inherits:
Object
  • Object
show all
Defined in:
lib/sports/structs/group.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(key: nil, name:, teams:) ⇒ Group

Returns a new instance of Group.



6
7
8
9
10
11
12
# File 'lib/sports/structs/group.rb', line 6

def initialize( key: nil,
                name:,
                teams: )
  @key    = key    ## e.g. A,B,C  or 1,2,3, - note: always a string or nil
  @name   = name
  @teams  = teams
end

Instance Attribute Details

#keyObject (readonly)

Returns the value of attribute key.



4
5
6
# File 'lib/sports/structs/group.rb', line 4

def key
  @key
end

#nameObject (readonly)

Returns the value of attribute name.



4
5
6
# File 'lib/sports/structs/group.rb', line 4

def name
  @name
end

#teamsObject (readonly)

Returns the value of attribute teams.



4
5
6
# File 'lib/sports/structs/group.rb', line 4

def teams
  @teams
end