Skip to content

Instantly share code, notes, and snippets.

@jmeridth
Created April 9, 2010 16:19
Show Gist options
  • Save jmeridth/361332 to your computer and use it in GitHub Desktop.
Save jmeridth/361332 to your computer and use it in GitHub Desktop.
hobby suggestions in ruby
case suggested_hobby.suggested_by
when "Joe Ocampo"
raise "Hobby requirement met with reading code, no others necessary"
when wife
try_once_to_appease_and_move_on
else
raise "No thanks"
end
@ChristopherMacGown
Copy link

The way that method sounds, it's probably defined like:

class Hobby
def try_once_to_appease_and_move_on
self.execute() rescue nil
end
end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment