Sha256: b511c29060d50f6043a885059819ef1cf61ae4e7373a2f55009024c5bd7ce061

Contents?: true

Size: 206 Bytes

Versions: 1

Compression:

Stored size: 206 Bytes

Contents

class NumbersTranslator::Validator

  def self.validate(number)
    number = number.to_s
    return (@@pattern.match(number) && number.length <= 16) || false
  end

  protected

  @@pattern = /^[0-9]+$/
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
numbers_translator-0.1.0 lib/numbers_translator/validator.rb