Sha256: 3168ad29b3c9626bcd166cd98705b6a6834f4ebf623e373d90e8795f59534b4b

Contents?: true

Size: 622 Bytes

Versions: 1

Compression:

Stored size: 622 Bytes

Contents

require "numbers_translator/version"
require "numbers_translator/validator"
require "numbers_translator/prepare_data"
require "numbers_translator/data_storage"
require "numbers_translator/engine"

module NumbersTranslator
  class Translator
    def self.make(number, lang = 'uk')

      unless Validator.validate number
        raise ArgumentError, 'Invalid characters are present or a number greater than 16 characters!'
      end

      engine = Engine.new(
          PrepareData.set(number),
          DataStorage.get_storage,
          lang
      )
      engine.run
    end
  end

  private

  def initialize
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
numbers_translator-0.1.0 lib/numbers_translator.rb