Skip to content

gryaznov/fuel_app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Fuel App

A tech task demo app, which calculates fuel required for the space flight.

Usage:

IRB:
> require './lib/fuel_calc'
> FuelCalc.calculate(mass: 28801, route: [[:launch, 9.807], [:land, 1.62], [:launch, 1.62], [:land, 9.807]])
> FuelCalc.calculate(mass: 75432, route: ["Earth", "Moon", "Moon", "Mars", "Mars", "Earth"])
> FuelCalc.calculate(mass: 75432, route: [:earth, :moon, :moon, :mars, :mars, :earth])
CLI:
$ cd fuel_app
$ ruby ./lib/fuel_calc.rb 75432 Earth Moon Moon Mars Mars Earth

Tests:

$ cd fuel_app
$ ruby ./test/fuel_calc_test.rb

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages