1 2 3 4 5 6 7 8 9 10 11 |
self.split(//).inject(0) {|a, c| a += c.upcase[0] - 64}
end
(to_money == 100)
end
end
puts "ZZZV".dollar?
|
Pastie
Support Pastie
or read my
Pastie << self
blog
1 2 3 4 5 6 7 8 9 10 11 |
self.split(//).inject(0) {|a, c| a += c.upcase[0] - 64}
end
(to_money == 100)
end
end
puts "ZZZV".dollar?
|