Class: ULID::Rails::PostgresqlType::Data

Inherits:
Type::Data
  • Object
show all
Defined in:
lib/ulid/rails/postgresql_type.rb

Constant Summary

Constants inherited from Type::Data

Type::Data::INVALID_CHARACTERS_REGEX, Type::Data::VALID_INITIAL_CHARACTER_REGEX

Instance Attribute Summary

Attributes inherited from Type::Data

#value

Instance Method Summary collapse

Methods inherited from Type::Data

from_serialized, #initialize, valid_ulid?

Constructor Details

This class inherits a constructor from ULID::Rails::Type::Data

Instance Method Details

#hexObject Also known as: to_s



7
8
9
10
11
# File 'lib/ulid/rails/postgresql_type.rb', line 7

def hex
  hexed = super
  return nil if hexed.nil?
  [hexed].pack("H*")
end