require 'active_support/core_ext'

class Float
...

Ruby Humanizing currency

by Stephen, May 03, 2011 10:44, No refactoring, tagged with rails, strings, money

Looking for a more succinct...

057e54d9a7b6ce3614413fcab825fca8 Talk
def rot_encode(s, offset=2)
   s.split('').map{ |char| (char.ord + offset).chr }.join
end

Ruby rot encode

by Sam Figueroa, January 17, 2010 11:44, 5 refactorings, tagged with strings, rot, rotation, encode

Rotation encoding with vari...

45596033957b2b6d7ef8fe6545e0b7e7 Talk
data = data.gsub("\xA0", " ")
data = data.gsub("\x99", "(TM)")
data = data.gsub("\x97", "-")
...

Ruby simplify multiple gsub

by kenr, August 27, 2008 01:10, 11 refactorings, tagged with strings

I could put the search/repl...

60997be4fbb4f5719d6eb68a1eadee9a Talk