Empty classes for reporting

This commit is contained in:
Michael Miller 2021-05-06 22:10:59 -06:00
parent ff5d855389
commit f3afd74dc5
No known key found for this signature in database
GPG key ID: F9A0C5C65B162436
2 changed files with 20 additions and 0 deletions

View file

@ -0,0 +1,13 @@
require "./reporter"
module Spectator::Reporters
# Reports events to multiple other reporters.
# Events received by this reporter will be sent to others.
class BroadcastReporter < Reporter
# Creates the broadcast reporter.
# Takes a collection of reporters to pass events along to.
def initialize(reporters : Enumerable(Reporter))
@reporters = reporters.to_a
end
end
end

View file

@ -0,0 +1,7 @@
module Spectator::Reporters
# Base class and interface used to notify systems of events.
# This is typically used for producing output from test results,
# but can also be used to send data to external systems.
abstract class Reporter
end
end