Class: Dionysus::Producer::Registry::Validator

Inherits:
Object
  • Object
show all
Defined in:
lib/dionysus/producer/registry/validator.rb

Instance Method Summary collapse

Constructor Details

#initialize(registry: Dionysus::Producer.registry) ⇒ Validator

Returns a new instance of Validator.



7
8
9
# File 'lib/dionysus/producer/registry/validator.rb', line 7

def initialize(registry: Dionysus::Producer.registry)
  @registry = registry
end

Instance Method Details

#validate_columnsObject



11
12
13
14
15
16
17
18
19
20
# File 'lib/dionysus/producer/registry/validator.rb', line 11

def validate_columns
  registry.registrations.each_value do |registration|
    registration.topics.each do |topic|
      topic
        .models
        .flat_map(&:observables_config)
        .each { |observable_config| validate_observable(observable_config) }
    end
  end
end