Class: SimulatorClassification
- Inherits:
-
Object
- Object
- SimulatorClassification
- Defined in:
- app/models/simulator_classification.rb
Instance Method Summary collapse
- #cup ⇒ Object
-
#initialize(championship) ⇒ SimulatorClassification
constructor
A new instance of SimulatorClassification.
- #phase ⇒ Object
- #round ⇒ Object
- #to_foot_stats ⇒ Object
Constructor Details
#initialize(championship) ⇒ SimulatorClassification
Returns a new instance of SimulatorClassification.
4 5 6 |
# File 'app/models/simulator_classification.rb', line 4 def initialize(championship) @championship = championship end |
Instance Method Details
#cup ⇒ Object
32 33 34 35 36 37 38 |
# File 'app/models/simulator_classification.rb', line 32 def cup if last_match last_match.cup else '' end end |
#phase ⇒ Object
24 25 26 27 28 29 30 |
# File 'app/models/simulator_classification.rb', line 24 def phase if last_match last_match.phase else 'Primeira Fase' end end |
#round ⇒ Object
16 17 18 19 20 21 22 |
# File 'app/models/simulator_classification.rb', line 16 def round if last_match last_match.round else 1 end end |
#to_foot_stats ⇒ Object
8 9 10 11 12 13 14 |
# File 'app/models/simulator_classification.rb', line 8 def to_foot_stats if @championship.has_classification? championship_classification else classification_missing end end |