Class: PgFuncall::PGUUID

Inherits:
Typed
  • Object
show all
Defined in:
lib/pg_funcall.rb

Instance Attribute Summary

Attributes inherited from Typed

#type, #value

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Typed

#__pg_type

Constructor Details

#initialize(uuid) ⇒ PGUUID

Returns a new instance of PGUUID.



83
84
85
# File 'lib/pg_funcall.rb', line 83

def initialize(uuid)
  super(uuid, 'uuid')
end

Class Method Details

.generateObject



87
88
89
# File 'lib/pg_funcall.rb', line 87

def self.generate
  PGUUID.initialize(UUID.new.generate)
end

Instance Method Details

#to_sObject



91
92
93
# File 'lib/pg_funcall.rb', line 91

def to_s
  self.value
end