Module: EventEngine::Definition
- Defined in:
- lib/event_engine/definition.rb,
lib/event_engine/definition/version.rb,
lib/event_engine/definition/event_schema.rb,
lib/event_engine/definition/configuration.rb,
lib/event_engine/definition/null_publisher.rb,
lib/event_engine/definition/schema_registry.rb,
sig/event_engine/definition.rbs
Defined Under Namespace
Classes: Configuration, Error, EventSchema, NullPublisher, PublisherNotConfigured, SchemaRegistry
Constant Summary
collapse
- VERSION =
"0.3.0"
Class Attribute Summary collapse
Class Method Summary
collapse
Class Attribute Details
.publisher ⇒ Object
21
22
23
|
# File 'lib/event_engine/definition.rb', line 21
def publisher
@publisher ||= NullPublisher.new
end
|
Class Method Details
.configuration ⇒ Object
46
47
48
|
# File 'lib/event_engine/definition.rb', line 46
def configuration
@configuration ||= Configuration.new
end
|
50
51
52
|
# File 'lib/event_engine/definition.rb', line 50
def configure
yield(configuration)
end
|
.pack_schema_paths ⇒ Object
38
39
40
|
# File 'lib/event_engine/definition.rb', line 38
def pack_schema_paths
packs.map(&:schema_path)
end
|
.packs ⇒ Object
29
30
31
|
# File 'lib/event_engine/definition.rb', line 29
def packs
@packs ||= []
end
|
.register_pack(pack) ⇒ Object
33
34
35
36
|
# File 'lib/event_engine/definition.rb', line 33
def register_pack(pack)
packs << pack unless packs.include?(pack)
pack
end
|
.reset_configuration! ⇒ Object
54
55
56
|
# File 'lib/event_engine/definition.rb', line 54
def reset_configuration!
@configuration = nil
end
|
.reset_packs! ⇒ Object
42
43
44
|
# File 'lib/event_engine/definition.rb', line 42
def reset_packs!
@packs = nil
end
|
.reset_publisher! ⇒ Object
25
26
27
|
# File 'lib/event_engine/definition.rb', line 25
def reset_publisher!
@publisher = nil
end
|