Class: Chronos::Application::DependencyReporter
- Inherits:
-
Object
- Object
- Chronos::Application::DependencyReporter
- Defined in:
- lib/chronos/application/dependency_reporter.rb
Overview
Builds one bounded inventory from already loaded runtime components.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(config, options = {}) ⇒ DependencyReporter
constructor
A new instance of DependencyReporter.
Constructor Details
#initialize(config, options = {}) ⇒ DependencyReporter
Returns a new instance of DependencyReporter.
16 17 18 19 20 21 22 |
# File 'lib/chronos/application/dependency_reporter.rb', line 16 def initialize(config, = {}) @config = config @loaded_specs = [:loaded_specs] || proc { Gem.loaded_specs } @constants = [:constants] || {} @mutex = Mutex.new @reported = false end |
Instance Method Details
#call ⇒ Object
24 25 26 27 28 29 30 31 32 33 |
# File 'lib/chronos/application/dependency_reporter.rb', line 24 def call @mutex.synchronize do return nil if @reported || !@config.dependency_reporting @reported = true build_payload end rescue StandardError nil end |