Sha256: a2a9bd9c5da250c70359768042ba40fd0420758102e5ab831b00ffad6199c627

Contents?: true

Size: 243 Bytes

Versions: 47

Compression:

Stored size: 243 Bytes

Contents

class Object
  # active_support/inflector.rb
  def underscore(camel_cased_word)
    camel_cased_word.to_s.gsub(/::/, '/').
    gsub(/([A-Z]+)([A-Z][a-z])/,'\1_\2').
    gsub(/([a-z\d])([A-Z])/,'\1_\2').
    tr("-", "_").
    downcase
  end
end

Version data entries

47 entries across 47 versions & 2 rubygems

Version Path
ruboto-1.6.1 lib/ruboto/core_ext/object.rb
ruboto-1.6.0 lib/ruboto/core_ext/object.rb
ruboto-1.5.0 lib/ruboto/core_ext/object.rb
ruboto-1.4.1 lib/ruboto/core_ext/object.rb
ruboto-1.4.0 lib/ruboto/core_ext/object.rb
ruboto-1.3.1 lib/ruboto/core_ext/object.rb
ruboto-1.3.0 lib/ruboto/core_ext/object.rb
ruboto-1.2.0 lib/ruboto/core_ext/object.rb
ruboto-1.1.2 lib/ruboto/core_ext/object.rb
ruboto-1.1.1 lib/ruboto/core_ext/object.rb
ruboto-1.1.0 lib/ruboto/core_ext/object.rb
ruboto-1.0.3 lib/ruboto/core_ext/object.rb
ruboto-1.0.2 lib/ruboto/core_ext/object.rb
ruboto-1.0.1 lib/ruboto/core_ext/object.rb
ruboto-1.0.0 lib/ruboto/core_ext/object.rb
ruboto-0.16.0 lib/ruboto/core_ext/object.rb
ruboto-0.15.0 lib/ruboto/core_ext/object.rb
ruboto-0.14.0 lib/ruboto/core_ext/object.rb
ruboto-0.13.0 lib/ruboto/core_ext/object.rb
ruboto-0.12.0 lib/ruboto/core_ext/object.rb