summaryrefslogtreecommitdiff
path: root/lib/metropolis/multi_hash/to_i.rb
blob: 69b2819bb6bae1239c786c0b8f36a4c71841dd8b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
# -*- encoding: binary -*-
# simple "hashing" method which converts keys to integers,
# this may be useful for databases that only store numeric keys
module Metropolis::MultiHash::ToI
  def to_i(key)
    key.to_i
  end

  def to_i_16(key)
    key.to_i(16)
  end
end