Fix: rinomina Engine.for in for_match (keyword riservata Ruby).
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -9,7 +9,7 @@ module Scoring
|
||||
end
|
||||
|
||||
def call
|
||||
Engine.for(@match).apply(session: @session, action: @action)
|
||||
Engine.for_match(@match).apply(session: @session, action: @action)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -9,18 +9,18 @@ module Scoring
|
||||
"timer" => Engines::TimerEngine
|
||||
}.freeze
|
||||
|
||||
def self.for(match)
|
||||
def self.for_match(match)
|
||||
board = match.effective_board_type
|
||||
klass = ENGINES.fetch(board) { Engines::GenericEngine }
|
||||
klass.new(match: match)
|
||||
end
|
||||
|
||||
def self.for_session(session)
|
||||
for(session.match)
|
||||
for_match(session.match)
|
||||
end
|
||||
|
||||
def self.ensure_score_for(session)
|
||||
for(session.match).ensure_score(session)
|
||||
for_match(session.match).ensure_score(session)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -7,7 +7,7 @@ module Scoring
|
||||
end
|
||||
|
||||
def call
|
||||
Engine.for(@session.match).sync(session: @session, payload: @payload)
|
||||
Engine.for_match(@session.match).sync(session: @session, payload: @payload)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user