Class: Ibandit::GermanDetailsConverter::Rule004700

Inherits:
BaseRule
  • Object
show all
Defined in:
lib/ibandit/german_details_converter.rb

Instance Method Summary collapse

Methods inherited from BaseRule

#initialize

Constructor Details

This class inherits a constructor from Ibandit::GermanDetailsConverter::BaseRule

Instance Method Details

#converted_detailsObject



981
982
983
984
985
986
987
988
989
990
991
992
# File 'lib/ibandit/german_details_converter.rb', line 981

def converted_details
   = @account_number.gsub(/\A0+/, '')

   =
    if .size == 8
      .ljust(10, '0')
    else
      .rjust(10, '0')
    end

  { bank_code: @bank_code, account_number:  }
end