Class: CoolId::Id
- Inherits:
-
Struct
- Object
- Struct
- CoolId::Id
- Defined in:
- lib/cool_id.rb
Overview
Struct representing a parsed CoolId.
Instance Attribute Summary collapse
-
#id ⇒ String
The full ID (prefix + separator + key).
-
#id_field ⇒ Symbol
The field in the model used to store the ID.
-
#key ⇒ String
The unique part of the ID (excluding prefix and separator).
-
#model_class ⇒ Class
The ActiveRecord model class associated with this ID.
-
#prefix ⇒ String
The prefix of the ID.
Instance Attribute Details
#id ⇒ String
The full ID (prefix + separator + key).
33 34 35 |
# File 'lib/cool_id.rb', line 33 def id @id end |
#id_field ⇒ Symbol
The field in the model used to store the ID.
33 34 35 |
# File 'lib/cool_id.rb', line 33 def id_field @id_field end |
#key ⇒ String
The unique part of the ID (excluding prefix and separator).
33 34 35 |
# File 'lib/cool_id.rb', line 33 def key @key end |
#model_class ⇒ Class
The ActiveRecord model class associated with this ID.
33 34 35 |
# File 'lib/cool_id.rb', line 33 def model_class @model_class end |
#prefix ⇒ String
The prefix of the ID.
33 34 35 |
# File 'lib/cool_id.rb', line 33 def prefix @prefix end |