Sha256: 4f826cbbc868d35de92c3eaa79a4724d5ef7ef514a0efe2bfa3d7949c94816aa
Contents?: true
Size: 480 Bytes
Versions: 27
Compression:
Stored size: 480 Bytes
Contents
module Approvals module Reporters class FirstWorkingReporter attr_accessor :reporters def initialize(*reporters) self.reporters = reporters end def working_in_this_environment? reporters.any?(&:working_in_this_environment?) end def report(received, approved) reporter = reporters.find(&:working_in_this_environment?) reporter.report(received, approved) unless reporter.nil? end end end end
Version data entries
27 entries across 27 versions & 2 rubygems