lib/lite/uxid/nanoid.rb in lite-uxid-1.1.3 vs lib/lite/uxid/nanoid.rb in lite-uxid-1.2.0
- old
+ new
@@ -1,21 +1,12 @@
# frozen_string_literal: true
module Lite
module Uxid
- class Nanoid < Lite::Uxid::Base
+ class Nanoid < Irreversible
- class << self
-
- def encode
- klass = new
- klass.encode
- end
-
- end
-
def encode
- encoding_chars.chars.sample(encoding_length).join
+ coder_chars.chars.sample(coder_length).join
end
end
end
end