module Schatter::Index
Constants
- LETTERS
Public Instance Methods
from_index(string)
click to toggle source
# File lib/schatter/index.rb, line 8 def from_index string string.scan(/./).map{|c| LETTERS.index c}.join.to_i end
to_index(number)
click to toggle source
# File lib/schatter/index.rb, line 4 def to_index number number.to_s.scan(/./).map{|c| LETTERS[c.to_i]}.join('') end