class Leafy::Core::ConsoleReporter::Builder
Public Class Methods
for_registry(registry, &block)
click to toggle source
# File lib/leafy/core/console_reporter.rb, line 8 def self.for_registry(registry, &block) result = new(registry) if block_given? result.instance_eval(&block) result.build else result end end
new(registry)
click to toggle source
# File lib/leafy/core/console_reporter.rb, line 18 def initialize(registry) @registry = registry end
Public Instance Methods
build()
click to toggle source
# File lib/leafy/core/console_reporter.rb, line 40 def build ConsoleReporter.new(@registry, #locale, #timeZone, #rateUnit, #durationUnit, #filter, @executor, @shutdown_executor_on_stop, clock: @clock, output: @output) #disabledMetricAttributes end
output_to(output)
click to toggle source
# File lib/leafy/core/console_reporter.rb, line 26 def output_to(output) @output = output self end
schedule_on(executor)
click to toggle source
# File lib/leafy/core/console_reporter.rb, line 36 def schedule_on(executor) @executor = executor end
shutdown_executor_on_stop(value)
click to toggle source
# File lib/leafy/core/console_reporter.rb, line 22 def shutdown_executor_on_stop(value) @shutdown_executor_on_stop = value end
with_clock(clock)
click to toggle source
# File lib/leafy/core/console_reporter.rb, line 31 def with_clock(clock) @clock = clock self end