Class: Post
- Inherits:
-
Sequent::AggregateRoot
- Object
- Post
- Defined in:
- lib/sequent/generator/template_project/lib/post/post.rb
Instance Method Summary collapse
-
#initialize(command) ⇒ Post
constructor
A new instance of Post.
Constructor Details
#initialize(command) ⇒ Post
Returns a new instance of Post.
4 5 6 7 8 9 10 |
# File 'lib/sequent/generator/template_project/lib/post/post.rb', line 4 def initialize(command) super(command.aggregate_id) apply PostAdded apply PostAuthorChanged, author: command. apply PostTitleChanged, title: command.title apply PostContentChanged, content: command.content end |