Module: Trax::Model::MTI::Entity
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/trax/model/mti/entity.rb
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
Instance Method Details
#model ⇒ Object
37 38 39 |
# File 'lib/trax/model/mti/entity.rb', line 37 def model @model ||= __send__(model_type_key) end |
#model_type ⇒ Object
29 30 31 |
# File 'lib/trax/model/mti/entity.rb', line 29 def model_type @model_type ||= uuid.record_type end |
#model_type_key ⇒ Object
33 34 35 |
# File 'lib/trax/model/mti/entity.rb', line 33 def model_type_key :"#{model_type.name.demodulize.underscore}_entity" end |
#uuid ⇒ Object
41 42 43 |
# File 'lib/trax/model/mti/entity.rb', line 41 def uuid @uuid ||= self[:id].uuid end |