Skip to content

Instantly share code, notes, and snippets.

@FioFiyo
Created March 29, 2016 23:54
Show Gist options
  • Save FioFiyo/c9f0122368397fbd644822d2616bfd1d to your computer and use it in GitHub Desktop.
Save FioFiyo/c9f0122368397fbd644822d2616bfd1d to your computer and use it in GitHub Desktop.
Adjusted the "bug"
# must be baller and either furnished or rent cheaper than 2100
def rent?(furnished, rent, baller)
if baller && (furnished && (rent < 2100))
puts "YES"
return true
else
puts " NAH"
return false
end
end
rent?(true, 2000, true)
###
# Add your "test" ("driver") code below in order to "test drive" (run) your method above...
# The test code will call the method with different permutations of options and output the result each time.
# This way, you will be able to run the renter.rb file from the CLI and look at the output of your "tests" to
#validate if the method works.
# Without the test code, it will be hard for you to know if this method is working as it should or not.
###
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment