Sha256: 3c35067865a7e2c1564b4be2c1857ba2f30118b6f16bc0d2d7911fa3040fd410

Contents?: true

Size: 303 Bytes

Versions: 9

Compression:

Stored size: 303 Bytes

Contents

module Cell::Util
  def util
    Inflector
  end

  class Inflector
    # copied from ActiveSupport.
    def self.underscore(constant)
      constant.gsub(/::/, '/').
      gsub(/([A-Z]+)([A-Z][a-z])/,'\1_\2').
      gsub(/([a-z\d])([A-Z])/,'\1_\2').
      tr("-", "_").
      downcase
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
cells-4.0.5 lib/cell/util.rb
cells-4.0.4 lib/cell/util.rb
cells-4.0.3 lib/cell/util.rb
cells-4.0.2 lib/cell/util.rb
cells-4.0.1 lib/cell/util.rb
cells-4.0.0 lib/cell/util.rb
cells-4.0.0.rc1 lib/cell/util.rb
cells-4.0.0.beta6 lib/cell/util.rb
cells-4.0.0.beta5 lib/cell/util.rb