class Stylesheet::Inflector

Public Class Methods

camelize(string) click to toggle source
# File lib/stylesheet/inflector.rb, line 3
def self.camelize(string)
  string.gsub(/(-)(.)/) {|m| m[1].upcase }
end
dasherize(string) click to toggle source
# File lib/stylesheet/inflector.rb, line 7
def self.dasherize(string)
  string.gsub(/(.)([A-Z])/) {|m| "#{m[0]}-#{m[1].downcase}" }
end