lib/active_uxid/ulid.rb in active_uxid-1.0.5 vs lib/active_uxid/ulid.rb in active_uxid-1.0.6
- old
+ new
@@ -9,10 +9,10 @@
klass = new
klass.uxid_encode
end
def uxid_encode
- (1..ENCODING_LENGTH).reduce('') do |str, num|
+ (1..ActiveUxid.configuration.encoding_length).reduce('') do |str, num|
shift = 128 - 5 * num
"#{str}#{ENCODING_CHARS[(uxid_octect >> shift) & 0x1f]}"
end
end