Skip to content

Instantly share code, notes, and snippets.

@Willamin
Created September 26, 2017 15:15
Show Gist options
  • Save Willamin/a819a0e1ff24a7c5b83c7b47fefcbd55 to your computer and use it in GitHub Desktop.
Save Willamin/a819a0e1ff24a7c5b83c7b47fefcbd55 to your computer and use it in GitHub Desktop.
my_array = [
:first,
:second,
:third,
:fourth,
:fifth
]
class Int32
def minus_one
self - 1
end
def st
minus_one
end
def nd
minus_one
end
def rd
minus_one
end
def th
minus_one
end
end
puts my_array[1.st]
puts my_array[2.nd]
puts my_array[4.th]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment