Sha256: 59f562f642bba49c88e9a6dd69bda6d6d0933d1b1fc4cd562149cbd91ef2b132

Contents?: true

Size: 240 Bytes

Versions: 8

Compression:

Stored size: 240 Bytes

Contents

module Stylesheet
  class Inflector
    def self.camelize(string)
      string.gsub(/(-)(.)/) {|m| m[1].upcase }
    end
    
    def self.dasherize(string)
      string.gsub(/(.)([A-Z])/) {|m| "#{m[0]}-#{m[1].downcase}" }
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
stylesheet-0.1.8 lib/stylesheet/inflector.rb
stylesheet-0.1.7 lib/stylesheet/inflector.rb
stylesheet-0.1.6 lib/stylesheet/inflector.rb
stylesheet-0.1.5 lib/stylesheet/inflector.rb
stylesheet-0.1.4 lib/stylesheet/inflector.rb
stylesheet-0.1.3 lib/stylesheet/inflector.rb
stylesheet-0.1.1 lib/stylesheet/inflector.rb
stylesheet-0.1.0 lib/stylesheet/inflector.rb