Module: Exid

Defined in:
lib/exid/coder.rb,
lib/exid.rb,
lib/exid/error.rb,
lib/exid/base62.rb,
lib/exid/record.rb,
lib/exid/version.rb,
lib/exid/configuration.rb

Overview

This could be a value objet, which could return various representations, including the timestamp, the UUID, the prefix, or the object itself. For now this is just a quick experiment to see where we go from here.

See more:

- https://dev.to/stripe/designing-apis-for-humans-object-ids-3o5a
- https://danschultzer.com/posts/prefixed-base62-uuidv7-object-ids-with-ecto
- https://dev.to/drnic/friendly-ids-for-ruby-on-rails-1c8p
- https://github.com/excid3/prefixed_ids
- https://github.com/sprql/uuid7-ruby
- https://github.com/steventen/base62-rb

Defined Under Namespace

Modules: Coder Classes: Base62, Configuration, DecodeError, Error, Record, Result

Constant Summary collapse

VERSION =
"0.2.3"

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.configurationObject



27
28
29
# File 'lib/exid/configuration.rb', line 27

def configuration
  @_configuration ||= Configuration.new
end

Class Method Details

.configure {|configuration| ... } ⇒ Object

Yields:



31
32
33
# File 'lib/exid/configuration.rb', line 31

def configure
  yield(configuration)
end

.reset_configuration!Object



35
36
37
# File 'lib/exid/configuration.rb', line 35

def reset_configuration!
  @configuration = Configuration.new
end