class Physicist::Laboratory::ScientistUpdatedEventListener

Public Instance Methods

receive(scientist_id:, position:, velocity:, updated_at:) click to toggle source
# File lib/physicist/laboratory/listeners/scientist_updated_event_listener.rb, line 4
def receive(scientist_id:, position:, velocity:, updated_at:)
  scientist_view = ScientistView.find_by(scientist_id: scientist_id)
  scientist_view.update(
    position: position,
    velocity: velocity,
    t0: updated_at
  )
end