Method: Cassandra::Uuid#to_s

Defined in:
lib/cassandra/uuid.rb

#to_sObject

Returns a string representation of this UUID in the standard 8-4-4-4-12 form.



53
54
55
56
57
58
59
60
61
62
# File 'lib/cassandra/uuid.rb', line 53

def to_s
  @s ||= begin
    s = RAW_FORMAT % @n
    s.insert(20, HYPHEN)
    s.insert(16, HYPHEN)
    s.insert(12, HYPHEN)
    s.insert(8, HYPHEN)
    s
  end
end