Sha256: 21e76c5f3652d1bcfda1307129ace47e43b042ce6ca87187d1b8410fb74bbf8a

Contents?: true

Size: 248 Bytes

Versions: 2

Compression:

Stored size: 248 Bytes

Contents

module SpaceshipMissionSimulator
  class ValidateInitialWeight
    include Interactor

    def call
      return true if context.initial_weight.to_i.positive?

      context.fail! message: 'should provide positive initial weight'
    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_initial_weight.rb
spaceship_mission_simulator-0.1.0 lib/spaceship_mission_simulator/interactors/validate_initial_weight.rb