Skip to content

Instantly share code, notes, and snippets.

@stevegraham
Created June 21, 2011 10:50
Show Gist options
  • Select an option

  • Save stevegraham/1037614 to your computer and use it in GitHub Desktop.

Select an option

Save stevegraham/1037614 to your computer and use it in GitHub Desktop.
# keith.rb
class << Time
# The only two times of the day that matter to Keith!
def now
["Bounce 'o' clock", "Tuna 'o' clock"].sample
end
end
class String
# Takes a string a prints it in a strong irish accent
def to_keith
gsub(/[aeiou]/, 'a').upcase
end
alias to_keet to_keith
end
# Time.now
# => "Bounce 'o' clock"
# "put it in pivotal tracker".to_keith
# => "PAT AT AN PAVATAL TRACKAR"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment