Sha256: 22adb494243fc2f63de1f7beede1f56ba534656a891383791c5ddca377e3a4d5

Contents?: true

Size: 247 Bytes

Versions: 4

Compression:

Stored size: 247 Bytes

Contents

class String
  def first_caps
    self.split(/ /).map{|x| x.capitalize}.join(' ')
  end
  def my_underscore #fills in the gap in rails inflectors, since their #underscore method only works for CamelCase
    self.downcase.gsub(/\s+/,"_")
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
pixelearth-3.2.2 lib/required/string.rb
pixelearth-0.0.7 lib/required/string.rb
pixelearth-0.0.6 lib/required/string.rb
pixelearth-0.0.5 lib/required/string.rb