Sha256: c83dded7b1732c8f3e937fa02beb980c443effe4300a093fcfeedb6077e8e9d5

Contents?: true

Size: 281 Bytes

Versions: 2

Compression:

Stored size: 281 Bytes

Contents

module SpaceshipMissionSimulator
  class ValidateEventState
    include Interactor

    def call
      event_state = context.raw_data.first.to_sym

      return true if Event.known_state?(event_state)

      context.fail! message: 'should be only land or launch'
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
spaceship_mission_simulator-0.2.0 lib/spaceship_mission_simulator/interactors/validate_event_state.rb
spaceship_mission_simulator-0.1.0 lib/spaceship_mission_simulator/interactors/validate_event_state.rb