Class: SciolyFF::Interpreter::Penalty

Inherits:
Model
  • Object
show all
Defined in:
lib/sciolyff/interpreter/penalty.rb

Overview

Models a team penalty for a Science Olympiad team at a tournament

Instance Attribute Summary collapse

Attributes inherited from Model

#tournament

Instance Method Summary collapse

Methods inherited from Model

#initialize, #inspect

Constructor Details

This class inherits a constructor from SciolyFF::Interpreter::Model

Instance Attribute Details

#teamObject (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



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

#pointsObject



15
16
17
# File 'lib/sciolyff/interpreter/penalty.rb', line 15

def points
  @rep[:points]
end