Skip to content

Instantly share code, notes, and snippets.

@ShaneDelmore
Created July 16, 2013 20:28
Show Gist options
  • Select an option

  • Save ShaneDelmore/6012356 to your computer and use it in GitHub Desktop.

Select an option

Save ShaneDelmore/6012356 to your computer and use it in GitHub Desktop.
Cask Title
def self.title
self.name.gsub(/([a-zA-Z\d])([A-Z])/,'\1-\2').gsub(/([a-zA-Z\d])([A-Z])/,'\1-\2').downcase
end
attr_reader :title
def initialize(title=self.class.title)
@title = title
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment