Sha256: d799a0026e466238aaa1de8e7ba87365f620ef7b8c69e1d71682e5f65b6732c2

Contents?: true

Size: 898 Bytes

Versions: 1

Compression:

Stored size: 898 Bytes

Contents

# frozen_string_literal: true

require "yaml"
require_relative "company_number/version"
require_relative "company_number/validation"

module CompanyNumber
  autoload :Configuration, 'company_number/configuration'
  autoload :Dictionary,    'company_number/dictionary'
  autoload :Number,        'company_number/number'

  class << self
    def parse(company_number, country_code = nil)
      CompanyNumber::Number.new(company_number, country_code)
    end

    def configuration
      @_configuration ||= CompanyNumber::Configuration.new
    end

    def configure
      yield configuration
    end

    def dictionary
      configuration.dictionary.values
    end

    def excluded_countries
      configuration.excluded_countries
    end

    def custom_dictionary
      configuration.custom_dictionary
    end

    def strict_validation?
      configuration.strict_validation?
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
company_number-0.1.2 lib/company_number.rb