Sha256: b6e556b171b775516208ed29b184b333cecde09e9e6b4fb847286ce6b4cedb09

Contents?: true

Size: 442 Bytes

Versions: 2

Compression:

Stored size: 442 Bytes

Contents

require_relative 'spaceship_mission_simulator/interactors/simulate'

module SpaceshipMissionSimulator
  def simulate_spaceship_mission!(initial_weight, raw_path)
    Simulate.call! initial_weight: initial_weight,
                   raw_path: raw_path
  end

  def print_spaceship_mission_result(*args)
    simulate_spaceship_mission!(*args).result.awesome_print
  rescue Interactor::Failure => e
    p "Error: #{e.context.message}"
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

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