Module: Datamappify::Entity

Defined in:
lib/datamappify/entity.rb,
lib/datamappify/entity/relation.rb,
lib/datamappify/entity/composable.rb,
lib/datamappify/entity/inspectable.rb,
lib/datamappify/entity/lazy_checking.rb,
lib/datamappify/entity/composable/attribute.rb,
lib/datamappify/entity/composable/attributes.rb,
lib/datamappify/entity/composable/validators.rb,
lib/datamappify/entity/active_model/compatibility.rb

Defined Under Namespace

Modules: ActiveModel, Composable, Inspectable, LazyChecking, Relation

Class Method Summary collapse

Class Method Details

.included(klass) ⇒ Object



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/datamappify/entity.rb', line 11

def self.included(klass)
  klass.class_eval do
    include Observable
    include ::ActiveModel::Model
    include ActiveModel::Compatibility
    include Virtus
    include Virtus::Equalizer.new(inspect)
    include LazyChecking
    include Composable
    include Relation
    include Inspectable

    attribute :id, Integer
  end
end