Method: DataMapper::Property::UUID#load

Defined in:
lib/dm-types/uuid.rb

#load(value) ⇒ Object



60
61
62
63
64
65
66
# File 'lib/dm-types/uuid.rb', line 60

def load(value)
  if primitive?(value)
    value
  elsif !value.nil?
    UUIDTools::UUID.parse(value)
  end
end