Class: Physicist::Laboratory::ScientistCreatedEventListener

Inherits:
Metacosm::EventListener
  • Object
show all
Defined in:
lib/physicist/laboratory/listeners/scientist_created_event_listener.rb

Instance Method Summary collapse

Instance Method Details

#receive(scientist_id:, space_id:, name:, title:, position:, velocity:) ⇒ Object



4
5
6
7
8
9
10
11
12
# File 'lib/physicist/laboratory/listeners/scientist_created_event_listener.rb', line 4

def receive(scientist_id:, space_id:, name:, title:, position:, velocity:)
  ScientistView.create(
    scientist_id: scientist_id,
    space_id: space_id,
    display_name: "#{name} the #{title}",
    position: position,
    velocity: velocity
  )
end