Class: Rubygoal::MatchData::Factory

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/rubygoal/match_data.rb

Instance Method Summary collapse

Constructor Details

#initialize(game, side) ⇒ Factory

Returns a new instance of Factory.



8
9
10
11
# File 'lib/rubygoal/match_data.rb', line 8

def initialize(game, side)
  @game = game
  @side = side
end

Instance Method Details

#createObject



13
14
15
16
17
18
19
20
21
22
# File 'lib/rubygoal/match_data.rb', line 13

def create
  MatchData.new(
    my_score,
    other_score,
    ball_match_position,
    my_positions,
    other_positions,
    time
  )
end