Class: Hecks::Runtime::Routing::Envelope

Inherits:
Struct
  • Object
show all
Defined in:
lib/hecks/runtime/routing.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(aggregate:, entities: []) ⇒ Envelope

Returns a new instance of Envelope.



11
12
13
14
# File 'lib/hecks/runtime/routing.rb', line 11

def initialize(aggregate:, entities: [])
  super(aggregate: aggregate.to_s, entities: Array(entities).map(&:to_s).freeze)
  freeze
end

Instance Attribute Details

#aggregateObject

Returns the value of attribute aggregate

Returns:

  • (Object)

    the current value of aggregate



10
11
12
# File 'lib/hecks/runtime/routing.rb', line 10

def aggregate
  @aggregate
end

#entitiesObject

Returns the value of attribute entities

Returns:

  • (Object)

    the current value of entities



10
11
12
# File 'lib/hecks/runtime/routing.rb', line 10

def entities
  @entities
end