Method: StellarBase::GenRandomString.call

Defined in:
app/services/stellar_base/gen_random_string.rb

.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