Class: Kik::Runner

Inherits:
Object
  • Object
show all
Defined in:
lib/kik/runner.rb

Instance Method Summary collapse

Constructor Details

#initialize(port, verbose, command) ⇒ Runner

Returns a new instance of Runner.



3
4
5
# File 'lib/kik/runner.rb', line 3

def initialize(port, verbose, command)
  @port, @command, @verbose = port, command, verbose
end

Instance Method Details

#startObject



7
8
9
10
11
12
13
# File 'lib/kik/runner.rb', line 7

def start
  puts "Running `#{@command.join(' ')}' watching port #{@port} for a listener!" if @verbose
  while true
    run_command unless check_port
    sleep 5
  end
end