Class: EncodingEstimator::ParallelSupport

Inherits:
Object
  • Object
show all
Defined in:
lib/encoding_estimator/parallel_support.rb

Overview

Helper class to check for parallel processing support

Class Method Summary collapse

Class Method Details

.progress?Boolean

Method to query whether the ruby-progressbar gem is available (used for progressbar in Parallel.map)

Returns:

  • (Boolean)

    true, if the progressbar gem is available, false if not



17
18
19
# File 'lib/encoding_estimator/parallel_support.rb', line 17

def self.progress?
  @@progress ||= check_progress
end

.supported?Boolean

Method to query whether the parallel gem is available

Returns:

  • (Boolean)

    true, if the parallel gem is available, false if not



9
10
11
# File 'lib/encoding_estimator/parallel_support.rb', line 9

def self.supported?
  @@supported ||= check_support
end