Class: Support::Events::DomainEvent
- Inherits:
-
Object
- Object
- Support::Events::DomainEvent
- Defined in:
- lib/hecks/domain/templates/lib/support/events/domain_event.rb
Instance Attribute Summary collapse
-
#args ⇒ Object
readonly
Returns the value of attribute args.
-
#command ⇒ Object
readonly
Returns the value of attribute command.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#root ⇒ Object
readonly
Returns the value of attribute root.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(command) ⇒ DomainEvent
constructor
A new instance of DomainEvent.
Constructor Details
#initialize(command) ⇒ DomainEvent
Returns a new instance of DomainEvent.
5 6 7 8 9 10 11 |
# File 'lib/hecks/domain/templates/lib/support/events/domain_event.rb', line 5 def initialize(command) @command = command @root = @command.root @type = @command.class @name = @type.to_s.underscore @args = command.args end |
Instance Attribute Details
#args ⇒ Object (readonly)
Returns the value of attribute args.
4 5 6 |
# File 'lib/hecks/domain/templates/lib/support/events/domain_event.rb', line 4 def args @args end |
#command ⇒ Object (readonly)
Returns the value of attribute command.
4 5 6 |
# File 'lib/hecks/domain/templates/lib/support/events/domain_event.rb', line 4 def command @command end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
4 5 6 |
# File 'lib/hecks/domain/templates/lib/support/events/domain_event.rb', line 4 def name @name end |
#root ⇒ Object (readonly)
Returns the value of attribute root.
4 5 6 |
# File 'lib/hecks/domain/templates/lib/support/events/domain_event.rb', line 4 def root @root end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
4 5 6 |
# File 'lib/hecks/domain/templates/lib/support/events/domain_event.rb', line 4 def type @type end |