Sha256: 95f6bd185aa9cf34e25a311eb8129ec74e4b26c913300e37daffc61f003867ce

Contents?: true

Size: 340 Bytes

Versions: 5

Compression:

Stored size: 340 Bytes

Contents

require 'rubrowser/trace'
require 'rubrowser/server'

module Rubrowser
  module Monitor
    module_function

    def run(path: '', port: 8080)
      $rd, $wr = IO.pipe

      if fork
        $rd.close
        Trace.new(path: path).run
      else
        $wr.close
        Server.new(port: port).run
        exit
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rubrowser-2.11 lib/rubrowser/monitor.rb
rubrowser-2.10 lib/rubrowser/monitor.rb
rubrowser-2.9.1 lib/rubrowser/monitor.rb
rubrowser-2.9.0 lib/rubrowser/monitor.rb
rubrowser-2.8.0 lib/rubrowser/monitor.rb