Class: Rubygoal::Match
- Inherits:
-
Object
- Object
- Rubygoal::Match
- Defined in:
- lib/rubygoal/match.rb
Defined Under Namespace
Classes: Team
Instance Attribute Summary collapse
-
#me ⇒ Object
readonly
Returns the value of attribute me.
-
#other ⇒ Object
readonly
Returns the value of attribute other.
-
#time ⇒ Object
readonly
Returns the value of attribute time.
Instance Method Summary collapse
-
#initialize(my_score, other_score, time, other_formation) ⇒ Match
constructor
A new instance of Match.
Constructor Details
#initialize(my_score, other_score, time, other_formation) ⇒ Match
Returns a new instance of Match.
27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/rubygoal/match.rb', line 27 def initialize(my_score, other_score, time, other_formation) @me = Match::Team.new( my_score, result(my_score, other_score) ) @other = Match::Team.new( other_score, result(other_score, my_score), other_formation ) @time = time end |
Instance Attribute Details
#me ⇒ Object (readonly)
Returns the value of attribute me.
25 26 27 |
# File 'lib/rubygoal/match.rb', line 25 def me @me end |
#other ⇒ Object (readonly)
Returns the value of attribute other.
25 26 27 |
# File 'lib/rubygoal/match.rb', line 25 def other @other end |
#time ⇒ Object (readonly)
Returns the value of attribute time.
25 26 27 |
# File 'lib/rubygoal/match.rb', line 25 def time @time end |