Module: Toy::Extensions::UUID

Included in:
SimpleUUID::UUID
Defined in:
lib/toy/extensions/uuid.rb

Instance Method Summary collapse

Instance Method Details

#from_store(value) ⇒ Object



10
11
12
13
14
# File 'lib/toy/extensions/uuid.rb', line 10

def from_store(value, *)
  return nil if value.nil?
  return value if value.is_a?(self)
  new(value)
end

#to_store(value) ⇒ Object



4
5
6
7
8
# File 'lib/toy/extensions/uuid.rb', line 4

def to_store(value, *)
  return nil if value.nil?
  return value if value.is_a?(self)
  new(value)
end