Class: ProgressBar::Projector

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby-progressbar/projector.rb

Constant Summary collapse

DEFAULT_PROJECTOR =
ProgressBar::Projectors::SmoothedAverage
NAME_TO_PROJECTOR_MAP =
{
  'smoothed' => ProgressBar::Projectors::SmoothedAverage
}.freeze

Class Method Summary collapse

Class Method Details

.from_type(name) ⇒ Object



10
11
12
# File 'lib/ruby-progressbar/projector.rb', line 10

def self.from_type(name)
  NAME_TO_PROJECTOR_MAP.fetch(name, DEFAULT_PROJECTOR)
end