Sha256: 098f7de2e046cdd52f9239ae5c04f4952e6b496b0233fd92005879071b4050ab

Contents?: true

Size: 957 Bytes

Versions: 8

Compression:

Stored size: 957 Bytes

Contents

require 'i18n'
require 'ibandit/version'
require 'ibandit/errors'
require 'ibandit/iban'
require 'ibandit/german_details_converter'
require 'ibandit/swedish_details_converter'
require 'ibandit/iban_splitter'
require 'ibandit/iban_assembler'
require 'ibandit/local_details_cleaner'
require 'ibandit/check_digit'

I18n.load_path += Dir[File.expand_path('../../config/locales/*.{rb,yml}',
                                       __FILE__)]

module Ibandit
  class << self
    attr_accessor :bic_finder, :modulus_checker

    def find_bic(country_code, national_id)
      raise NotImplementedError, 'BIC finder is not defined' unless @bic_finder
      @bic_finder.call(country_code, national_id)
    end

    def structures
      @structures ||= YAML.load_file(
        File.expand_path('../../data/structures.yml', __FILE__)
      )
    end

    def translate(key, options = {})
      I18n.translate(key, { scope: [:ibandit] }.merge(options))
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
ibandit-0.7.0 lib/ibandit.rb
ibandit-0.6.6 lib/ibandit.rb
ibandit-0.6.5 lib/ibandit.rb
ibandit-0.6.4 lib/ibandit.rb
ibandit-0.6.3 lib/ibandit.rb
ibandit-0.6.2 lib/ibandit.rb
ibandit-0.6.1 lib/ibandit.rb
ibandit-0.6.0 lib/ibandit.rb