ShardsOfPower/primitive_adds.rb
2019-05-27 15:02:07 -04:00

19 lines
216 B
Ruby

class String
def titleize
gsub(/\w+/i) do |match|
ret = match.downcase
ret[0] = ret[0].upcase
ret
end
end
def titleize!
replace titleize
end
end
class Integer
def to_dots
"" * self
end
end