Sha256: 5f749cec881a6f71274e81990ee6d40688108ceaaf181c2f6607b7c1e1fae79f

Contents?: true

Size: 1.12 KB

Versions: 18

Compression:

Stored size: 1.12 KB

Contents

require "i18n"
require "ibandit/version"
require "ibandit/errors"
require "ibandit/constants"
require "ibandit/iban"
require "ibandit/german_details_converter"
require "ibandit/sweden/local_details_converter"
require "ibandit/sweden/validator"
require "ibandit/sweden/bank_lookup"
require "ibandit/iban_splitter"
require "ibandit/iban_assembler"
require "ibandit/pseudo_iban_assembler"
require "ibandit/pseudo_iban_splitter"
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

18 entries across 18 versions & 1 rubygems

Version Path
ibandit-0.11.28 lib/ibandit.rb
ibandit-0.11.27 lib/ibandit.rb
ibandit-0.11.26 lib/ibandit.rb
ibandit-0.11.25 lib/ibandit.rb
ibandit-0.11.24 lib/ibandit.rb
ibandit-0.11.23 lib/ibandit.rb
ibandit-0.11.19 lib/ibandit.rb
ibandit-0.11.18 lib/ibandit.rb
ibandit-0.11.17 lib/ibandit.rb
ibandit-0.11.16 lib/ibandit.rb
ibandit-0.11.15 lib/ibandit.rb
ibandit-0.11.14 lib/ibandit.rb
ibandit-0.11.13 lib/ibandit.rb
ibandit-0.11.12 lib/ibandit.rb
ibandit-0.11.11 lib/ibandit.rb
ibandit-0.11.10 lib/ibandit.rb
ibandit-0.11.9 lib/ibandit.rb
ibandit-0.11.7 lib/ibandit.rb