Module: Dapp::Dapp::Slug

Included in:
Dapp::Dapp
Defined in:
lib/dapp/dapp/slug.rb

Instance Method Summary collapse

Instance Method Details

#consistent_uniq_slugify(s) ⇒ Object



4
5
6
7
8
9
# File 'lib/dapp/dapp/slug.rb', line 4

def consistent_uniq_slugify(s)
  ruby2go_slug({ options: { data: s } }).tap do |res|
    raise Error::Build, code: :ruby2go_slug_failed_unexpected_error, data: { message: res["error"] } unless res["error"].nil?
    break res['data']
  end
end