Class: Aggregates::DomainObject
- Inherits:
-
Object
- Object
- Aggregates::DomainObject
show all
- Includes:
- ActiveModel::Attributes, ActiveModel::Model, ActiveModel::Validations
- Defined in:
- lib/aggregates/domain_object.rb
Overview
Defines an object that is an element of the domain.
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
.json_create(arguments) ⇒ Object
19
20
21
|
# File 'lib/aggregates/domain_object.rb', line 19
def self.json_create(arguments)
new(**arguments)
end
|
Instance Method Details
#to_json(*args) ⇒ Object
14
15
16
17
|
# File 'lib/aggregates/domain_object.rb', line 14
def to_json(*args)
json_data = attributes.merge({ JSON.create_id => self.class.name })
json_data.to_json(*args)
end
|