Sha256: 1ffcc4813f9a0c988be65f119a969321ef086aed71aa7cb425d921eab7a87100

Contents?: true

Size: 579 Bytes

Versions: 8

Compression:

Stored size: 579 Bytes

Contents

# frozen_string_literal: true

require_relative '../appmatcher.rb'

module Fusuma
  module Plugin
    module Inputs
      # Get active application's name
      class AppmatcherInput < Input
        attr_reader :pid

        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

8 entries across 8 versions & 1 rubygems

Version Path
fusuma-plugin-appmatcher-0.1.6 lib/fusuma/plugin/inputs/appmatcher_input.rb
fusuma-plugin-appmatcher-0.1.5 lib/fusuma/plugin/inputs/appmatcher_input.rb
fusuma-plugin-appmatcher-0.1.4 lib/fusuma/plugin/inputs/appmatcher_input.rb
fusuma-plugin-appmatcher-0.1.3 lib/fusuma/plugin/inputs/appmatcher_input.rb
fusuma-plugin-appmatcher-0.1.2 lib/fusuma/plugin/inputs/appmatcher_input.rb
fusuma-plugin-appmatcher-0.1.1 lib/fusuma/plugin/inputs/appmatcher_input.rb
fusuma-plugin-appmatcher-0.1.0 lib/fusuma/plugin/inputs/appmatcher_input.rb
fusuma-plugin-appmatcher-0.1.0.pre2 lib/fusuma/plugin/inputs/appmatcher_input.rb