Class: ActiveUUID::UUIDSerializer
- Inherits:
-
Object
- Object
- ActiveUUID::UUIDSerializer
- Defined in:
- lib/activeuuid/uuid.rb
Instance Method Summary collapse
Instance Method Details
#dump(uuid) ⇒ Object
43 44 45 |
# File 'lib/activeuuid/uuid.rb', line 43 def dump(uuid) uuid ? uuid.raw : nil end |
#load(binary) ⇒ Object
36 37 38 39 40 41 42 |
# File 'lib/activeuuid/uuid.rb', line 36 def load(binary) case binary when UUIDTools::UUID then binary when nil then nil else UUIDTools::UUID.parse_raw(binary) end end |