class Ksuid::Ksuid

Defined in:

ksuid/ksuid.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(ts : UInt32, seq : UInt32, part : UInt32) #

[View source]
def self.parse(val : UInt128) : Ksuid #

Parse an integer KSUID to a KSUID


[View source]

Class Method Detail

def self.parse(val : String, base : Int = 62) #

Parse a string KSUID to a KSUID


[View source]

Instance Method Detail

def part : UInt32 #

[View source]
def seq : UInt32 #

[View source]
def timestamp : Time #

Gets the timestamp of when this KSUID was generated as a Time


[View source]
def to_s(base : Int = 62, upcase : Bool = false) : String #

Stringify KSUID


[View source]
def to_u128 : UInt128 #

Get the valud of this KSUID as a UInt128

Numerical sorting will provide


[View source]