Class: StellarBase::GenRandomString
- Inherits:
-
Object
- Object
- StellarBase::GenRandomString
- Defined in:
- app/services/stellar_base/gen_random_string.rb
Class Method Summary collapse
Class Method Details
.call(length:) ⇒ Object
4 5 6 7 |
# File 'app/services/stellar_base/gen_random_string.rb', line 4 def self.call(length:) o = [(0..9), ('A'..'Z')].map(&:to_a).flatten string = (0...length).map { o[rand(o.length)] }.join end |