Sha256: 19b4914cc4579f490a498da73bb97f885939098cfa17a2d19b90263cb2356f8b
Contents?: true
Size: 291 Bytes
Versions: 2
Compression:
Stored size: 291 Bytes
Contents
module SpaceshipMissionSimulator EVENT_STATES = %i[land launch].freeze EVENT_ATTRS = %i[state planet reserved_fuel_weight fuel_weight].freeze Event = Struct.new(*EVENT_ATTRS, keyword_init: true) do def self.known_state?(state) EVENT_STATES.include? state 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/event.rb |
spaceship_mission_simulator-0.1.0 | lib/spaceship_mission_simulator/event.rb |