Class: SpaceshipMissionSimulator::ValidateInitialWeight

Inherits:
Object
  • Object
show all
Includes:
Interactor
Defined in:
lib/spaceship_mission_simulator/interactors/validate_initial_weight.rb

Instance Method Summary collapse

Instance Method Details

#callObject



5
6
7
8
9
# File 'lib/spaceship_mission_simulator/interactors/validate_initial_weight.rb', line 5

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

  context.fail! message: 'should provide positive initial weight'
end