Class: Sports::Group
- Inherits:
-
Object
- Object
- Sports::Group
- Defined in:
- lib/sports/structs/group.rb
Instance Attribute Summary collapse
-
#key ⇒ Object
readonly
Returns the value of attribute key.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#teams ⇒ Object
readonly
Returns the value of attribute teams.
Instance Method Summary collapse
-
#initialize(key: nil, name:, teams:) ⇒ Group
constructor
A new instance of Group.
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
#key ⇒ Object (readonly)
Returns the value of attribute key.
4 5 6 |
# File 'lib/sports/structs/group.rb', line 4 def key @key end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
4 5 6 |
# File 'lib/sports/structs/group.rb', line 4 def name @name end |
#teams ⇒ Object (readonly)
Returns the value of attribute teams.
4 5 6 |
# File 'lib/sports/structs/group.rb', line 4 def teams @teams end |