Class: Worldcup::Team
- Inherits:
-
Object
- Object
- Worldcup::Team
- Defined in:
- lib/worldcup.rb
Instance Attribute Summary collapse
-
#coach ⇒ Object
readonly
Returns the value of attribute coach.
-
#country ⇒ Object
readonly
Returns the value of attribute country.
-
#group ⇒ Object
readonly
Returns the value of attribute group.
Class Method Summary collapse
Instance Attribute Details
#coach ⇒ Object (readonly)
Returns the value of attribute coach.
7 8 9 |
# File 'lib/worldcup.rb', line 7 def coach @coach end |
#country ⇒ Object (readonly)
Returns the value of attribute country.
6 7 8 |
# File 'lib/worldcup.rb', line 6 def country @country end |
#group ⇒ Object (readonly)
Returns the value of attribute group.
8 9 10 |
# File 'lib/worldcup.rb', line 8 def group @group end |
Class Method Details
.all ⇒ Object
28 29 30 |
# File 'lib/worldcup.rb', line 28 def self.all @teams.values end |
.find(name) ⇒ Object
32 33 34 35 36 37 38 |
# File 'lib/worldcup.rb', line 32 def self.find(name) result = @teams[name.downcase] raise(RuntimeError, "No team found for lookup '#{name}'") unless result result end |