Class: MultipleMan::Runner

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/multiple_man/runner.rb

Constant Summary collapse

MODES =
[:general, :seed].freeze

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Runner

Returns a new instance of Runner.

Raises:

  • (ArgumentError)


22
23
24
25
26
# File 'lib/multiple_man/runner.rb', line 22

def initialize(options = {})
  @mode = options.fetch(:mode, :general)

  raise ArgumentError, "undefined mode: #{mode}" unless MODES.include?(mode)
end

Instance Method Details

#runObject



28
29
30
31
32
33
34
# File 'lib/multiple_man/runner.rb', line 28

def run
  MultipleMan.trap_signals!
  preload_framework!
  channel.prefetch(prefetch_size)
  build_listener.listen
  sleep
end