Skip to content

Instantly share code, notes, and snippets.

@rickharris
Created April 21, 2012 00:50
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 rickharris/2432923 to your computer and use it in GitHub Desktop.
Save rickharris/2432923 to your computer and use it in GitHub Desktop.
A simple algorithm to tell whether or not I am pleased with my Greenville coworkers' music choices
BRITNEY_LISTENERS = ["@seangaffney", "@jeremyjantz"]
def has_been_listening_to_britney?(twitter_handle)
BRITNEY_LISTENERS.include?(twitter_handle)
end
def is_rick_pleased?
["@seangaffney", "@jeremyjantz"].each do |coworker|
return false unless has_been_listening_to_britney?(coworker)
end
true
end
is_rick_pleased?
#=> true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment