Sha256: ffe1e904c14357ea98aa5dda2e7bc8cd39ec388c73e7d05353ba92a52efea306
Contents?: true
Size: 264 Bytes
Versions: 2
Compression:
Stored size: 264 Bytes
Contents
# frozen_string_literal: true require "securerandom" module Helpers def strip_str_and_validate(str) return str if str.nil? str = str.strip str.empty? ? nil : str end def random_four_digits SecureRandom.random_number(1000..9999) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
cpl-1.4.0 | lib/core/helpers.rb |
cpl-1.3.0 | lib/core/helpers.rb |