Class: ULID::Rails::PostgresqlType::Data
- Inherits:
-
Type::Data
- Object
- ActiveModel::Type::Binary::Data
- Type::Data
- ULID::Rails::PostgresqlType::Data
- 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
Instance Method Summary collapse
- #hex ⇒ Object (also: #to_s)
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
#hex ⇒ Object 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 |