Sha256: c2b3f20b3e262e3140cad2f5ada6f048638a25dceda9afb65faca50dbe79cb58

Contents?: true

Size: 559 Bytes

Versions: 8

Compression:

Stored size: 559 Bytes

Contents

module Hallmonitor
  # An {Outputter} is an object that can process {Hallmonitor::Event}s
  class Outputter
    attr_reader :name

    # Initializes a new Outputter
    # @param name [Object] Probably a string or symbol, the name of this
    # outputter
    def initialize(name)
      fail(ArgumentError, 'Outputter expects a name') if name.nil?
      @name = name
    end

    # Processes an event.  Child classes should implement this to output events
    # @param event [Event] the event to process
    def process(event)
      # Nothing
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
hallmonitor-5.2.0 lib/hallmonitor/outputter.rb
hallmonitor-5.1.0 lib/hallmonitor/outputter.rb
hallmonitor-5.0.0 lib/hallmonitor/outputter.rb
hallmonitor-4.2.0 lib/hallmonitor/outputter.rb
hallmonitor-4.1.0 lib/hallmonitor/outputter.rb
hallmonitor-4.0.0 lib/hallmonitor/outputter.rb
hallmonitor-3.0.0 lib/hallmonitor/outputter.rb
hallmonitor-2.0.0 lib/hallmonitor/outputter.rb