Module: FakeRUT

Defined in:
lib/sale/fake_rut.rb

Class Method Summary collapse

Class Method Details

.for(str) ⇒ Object



5
6
7
8
# File 'lib/sale/fake_rut.rb', line 5

def self.for(str)
  num = Digest::SHA1.hexdigest(str)[0..6].to_i(16)
  "#{num}-#{get_rut_digit(num)}"
end