Class: StellarBase::GenMemoFor

Inherits:
Object
  • Object
show all
Defined in:
app/services/stellar_base/gen_memo_for.rb

Constant Summary collapse

LENGTH =
8

Class Method Summary collapse

Class Method Details

.call(klass) ⇒ Object



6
7
8
9
10
11
12
13
14
# File 'app/services/stellar_base/gen_memo_for.rb', line 6

def self.call(klass)
  loop do
    memo = GenRandomString.(length: LENGTH)
    if !klass.exists?(memo: memo)
      return memo
      break
    end
  end
end