Class: Loupe::Executor

Inherits:
Object
  • Object
show all
Defined in:
lib/loupe/executor.rb

Overview

Executor

This abstract parent class is responsible for providing the basics for executors. Concrete classes are the process and ractor executors.

Direct Known Subclasses

ProcessExecutor, RactorExecutor

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ Loupe::Executor

Parameters:

  • options (Hash<Symbol, BasicObject>)


13
14
15
16
17
# File 'lib/loupe/executor.rb', line 13

def initialize(options)
  @options = options
  @queue = populate_queue
  @reporter = options[:interactive] ? PagedReporter.new(options) : PlainReporter.new(options)
end

Instance Method Details

#runInteger

Returns:

  • (Integer)

Raises:

  • (NotImplementedError)


20
21
22
# File 'lib/loupe/executor.rb', line 20

def run
  raise NotImplementedError, "Concrete implementations of executors should implement the run method"
end