Ruby Formats
I've been hacking around in Ruby again and I've started to use a feature I've ignored in the past, the format operator. It's just syntax suger for doing a C style sprintf but I think its makes the code a bit more readable.
Little things like this make me happy.
s = "My name is %s and I like the number %d" % ["Pete", 7]
Little things like this make me happy.
Comments