Sha256: 2779435b80082d18afd3f273b76f33fa6059161130b53034f74cf93e7279cca6

Contents?: true

Size: 658 Bytes

Versions: 10

Compression:

Stored size: 658 Bytes

Contents

# frozen_string_literal: true

require './lib/fusuma/plugin/detectors/detector'
require './lib/fusuma/plugin/buffers/buffer'
require './lib/fusuma/plugin/events/records/index_record'

module Fusuma
  module Plugin
    module Detectors
      class DummyDetector < Detector
        # @param buffers [Array<Buffers::Buffer>]
        # @return [Event]
        def detect(buffers)
          buffers.each do |buffer|
            next unless buffer.type == 'dummy'

            record = Events::Records::IndexRecord.new(index: Config::Index.new(%w[dummy index]))
            return create_event(record: record)
          end
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
fusuma-2.4.1 spec/lib/plugin/detectors/dummy_detector.rb
fusuma-2.4.0 spec/lib/plugin/detectors/dummy_detector.rb
fusuma-2.3.0 spec/lib/plugin/detectors/dummy_detector.rb
fusuma-2.2.0 spec/lib/plugin/detectors/dummy_detector.rb
fusuma-2.1.0 spec/lib/plugin/detectors/dummy_detector.rb
fusuma-2.0.5 spec/lib/plugin/detectors/dummy_detector.rb
fusuma-2.0.4 spec/lib/plugin/detectors/dummy_detector.rb
fusuma-2.0.3 spec/lib/plugin/detectors/dummy_detector.rb
fusuma-2.0.2 spec/lib/plugin/detectors/dummy_detector.rb
fusuma-2.0.1 spec/lib/plugin/detectors/dummy_detector.rb