Sha256: 7a22deb20889991de623793a437ce4097fb37fc1f9088a195848836ba665531a

Contents?: true

Size: 281 Bytes

Versions: 6

Compression:

Stored size: 281 Bytes

Contents

# From active-support/inflector.rb
class String
  def camelize(first_letter_in_uppercase = true)
    s = self
    if first_letter_in_uppercase
      s.gsub(/\/(.?)/) { '::' + $1.upcase }.gsub(/(^|_)(.)/) { $2.upcase }
    else
      s[0..0] + s.camelize[1..-1]
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
smallcage-0.3.2 lib/smallcage/misc.rb
smallcage-0.3.1 lib/smallcage/misc.rb
smallcage-0.3.0 lib/smallcage/misc.rb
smallcage-0.2.9 lib/smallcage/misc.rb
smallcage-0.2.8 lib/smallcage/misc.rb
smallcage-0.2.7 lib/smallcage/misc.rb