Module: Encore::Entity::ClassMethods
- Defined in:
- lib/encore/entity.rb
Instance Method Summary collapse
-
#linked_class ⇒ Object
Return the object class.
Instance Method Details
#linked_class ⇒ Object
Return the object class. If no object is present, try to guess the class with our own class name (‘UserEntity` would be `User`)
39 40 41 |
# File 'lib/encore/entity.rb', line 39 def linked_class @object ? @object.class : self.name.split(/Entity$/).first.constantize end |