class SpaceshipMissionSimulator::ValidateStartEvent
Public Instance Methods
call()
click to toggle source
# File lib/spaceship_mission_simulator/interactors/validate_start_event.rb, line 5 def call event = context.path.events.first return true if event.planet.key == :earth && event.state == :launch msg = 'spaceship mission should start only by launch from Earth' context.fail! message: msg end