Skip to content

Instantly share code, notes, and snippets.

@sos4nt
Created August 6, 2015 15:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sos4nt/a41b36d21f6eec5e0a42 to your computer and use it in GitHub Desktop.
Save sos4nt/a41b36d21f6eec5e0a42 to your computer and use it in GitHub Desktop.
elsif converted to else if
def describe(inhabitant)
if inhabitant == "sophie"
puts 'gender: female'
puts 'height: 145'
else
if inhabitant == "paul"
puts 'gender: male'
puts 'height: 145'
else
if inhabitant == "dawn"
puts 'gender: female'
puts 'height: 170'
else
if inhabitant == "brian"
puts 'gender: male'
puts 'height: 180'
else
puts 'species: Trachemys scripta elegans'
puts 'height: 6'
end
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment