Class: Termplot::Consumers::MultiSourceConsumer

Inherits:
BaseConsumer
  • Object
show all
Defined in:
lib/termplot/consumers/multi_source_consumer.rb

Instance Method Summary collapse

Methods inherited from BaseConsumer

#initialize, #run

Constructor Details

This class inherits a constructor from Termplot::Consumers::BaseConsumer

Instance Method Details

#positioned_widgetsObject



9
10
11
# File 'lib/termplot/consumers/multi_source_consumer.rb', line 9

def positioned_widgets
  @positioned_widgets ||= config.positioned_widgets
end

#register_producers_and_brokersObject



13
14
15
16
17
18
19
# File 'lib/termplot/consumers/multi_source_consumer.rb', line 13

def register_producers_and_brokers
  config.widget_configs.each do |widget_config|
    producer = build_producer(widget_config)
    broker_pool.broker(sender: producer, receiver: widget_config.widget)
    producer_pool.add_producer(producer)
  end
end