Class: SportsManager::NilTeam

Inherits:
Object
  • Object
show all
Defined in:
lib/sports_manager/nil_team.rb

Overview

Public: A representation of no Team used by next round matches that don’t have a winner set yet.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(category:) ⇒ NilTeam

Returns a new instance of NilTeam.



9
10
11
12
# File 'lib/sports_manager/nil_team.rb', line 9

def initialize(category:)
  @category = category
  @participants = []
end

Instance Attribute Details

#categoryObject (readonly)

Returns the value of attribute category.



7
8
9
# File 'lib/sports_manager/nil_team.rb', line 7

def category
  @category
end

#participantsObject (readonly)

Returns the value of attribute participants.



7
8
9
# File 'lib/sports_manager/nil_team.rb', line 7

def participants
  @participants
end

Instance Method Details

#==(other) ⇒ Object



18
19
20
21
22
# File 'lib/sports_manager/nil_team.rb', line 18

def ==(other)
  return false unless instance_of? other.class

  category == other.category
end

#nameObject



14
15
16
# File 'lib/sports_manager/nil_team.rb', line 14

def name
  ''
end