Top Level Namespace

Defined Under Namespace

Modules: ActiveModel, IbanBic Classes: Bic

Instance Method Summary collapse

Instance Method Details

#__bic_validation_proc(digits) ⇒ Object



3
4
5
6
# File 'lib/iban_bic/validators/countries/es.rb', line 3

def __bic_validation_proc(digits)
  ret = 11 - digits.chars.each_with_index.sum { |x, i| x.to_i * 2**i } % 11
  ret < 10 ? ret : 11 - ret
end