Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
This paste will be private.
class String def to_money self.split(//).inject(0) {|a, c| a += c.upcase[0] - 64} end def dollar? (to_money == 100) end end puts "ZZZV".dollar?
From the Design Piracy series on my blog: