Skip to content

Instantly share code, notes, and snippets.

@armw4
Last active January 3, 2016 15:59
Show Gist options
  • Save armw4/8486479 to your computer and use it in GitHub Desktop.
Save armw4/8486479 to your computer and use it in GitHub Desktop.
Well...I've got quite a few nicknames for my dear friend D$...I meant Dollarz...I meant D Dollarz...I meant Danny...uh...yea
DANNY_ALIASES = ["Danny", "D$", "Dollarz", "D Dollarz"]
DANNY_ALIASES.each do |item|
def item.eql? (other)
DANNY_ALIASES.include? other and DANNY_ALIASES.include? self
end
end
DANNY_ALIASES.each_with_index do |item, index|
if next_item = DANNY_ALIASES[index + 1]
puts "#{item} == #{next_item}" if item.eql? next_item
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment