Class: Lite::Uxid::Irreversible::Uuid
- Defined in:
- lib/lite/uxid/irreversible/uuid.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
decode, #decode, encode, #initialize
Methods included from Base
Constructor Details
This class inherits a constructor from Lite::Uxid::Irreversible::Base
Instance Method Details
#encode ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/lite/uxid/irreversible/uuid.rb', line 8 def encode encoded_id = case coder_version when 7 SecureRandom.uuid_v7 else SecureRandom.uuid end "#{coder_prefix}#{encoded_id}" end |