Sha256: 9f44997508e8af41309817326303fe49fdc85c0b18113963183bf3e3785ccf54

Contents?: true

Size: 553 Bytes

Versions: 1

Compression:

Stored size: 553 Bytes

Contents

# frozen_string_literal: true

require_relative '../appmatcher.rb'

module Fusuma
  module Plugin
    module Inputs
      # Get active application's name
      class AppmatcherInput < Input
        def io
          @backend ||= Appmatcher.backend_klass.new

          @pid ||= begin
                     pid = @backend.watch_start
                     # NOTE: Closing the parent process's pipe
                     @backend.writer.close

                     pid
                   end

          @backend.reader
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
fusuma-plugin-appmatcher-0.1.0.pre lib/fusuma/plugin/inputs/appmatcher_input.rb