Class: Support::Events::DomainEvent

Inherits:
Object
  • Object
show all
Defined in:
lib/hecks/domain/templates/lib/support/events/domain_event.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#argsObject (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

#commandObject (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

#nameObject (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

#rootObject (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

#typeObject (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