Skip to content

Instantly share code, notes, and snippets.

@stw
Created April 15, 2011 15:59
Show Gist options
  • Save stw/921937 to your computer and use it in GitHub Desktop.
Save stw/921937 to your computer and use it in GitHub Desktop.
def truncate(string)
# do something wonderful here
end
string = string.gsub(/regex/, '\1')
puts "Hey check out <a href="#{string}">#{truncate(string)}</a>"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment