Skip to content

Instantly share code, notes, and snippets.

@bchase
Created June 3, 2014 07:09
Show Gist options
  • Save bchase/a8efb9041d74c19b035e to your computer and use it in GitHub Desktop.
Save bchase/a8efb9041d74c19b035e to your computer and use it in GitHub Desktop.
def triangle(a, b, c)
sides = *a, b, c
if sides.uniq.length == 1
:equilateral
elsif sides.uniq.length == 2
:isosceles
else
:scalene
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment