Class: SciolyFF::Interpreter::Penalty
- Defined in:
- lib/sciolyff/interpreter/penalty.rb
Overview
Models a team penalty for a Science Olympiad team at a tournament
Instance Attribute Summary collapse
-
#team ⇒ Object
readonly
Returns the value of attribute team.
Attributes inherited from Model
Instance Method Summary collapse
Methods inherited from Model
Constructor Details
This class inherits a constructor from SciolyFF::Interpreter::Model
Instance Attribute Details
#team ⇒ Object (readonly)
Returns the value of attribute team.
13 14 15 |
# File 'lib/sciolyff/interpreter/penalty.rb', line 13 def team @team end |
Instance Method Details
#link_to_other_models(interpreter) ⇒ Object
8 9 10 11 |
# File 'lib/sciolyff/interpreter/penalty.rb', line 8 def link_to_other_models(interpreter) super @team = interpreter.teams.find { |t| t.number == @rep[:team] } end |
#points ⇒ Object
15 16 17 |
# File 'lib/sciolyff/interpreter/penalty.rb', line 15 def points @rep[:points] end |