Class: Sequel::Dataset

Inherits:
Object
  • Object
show all
Defined in:
lib/tqdm/sequel.rb

Overview

In order to use Tqdm with Sequel Datasets, we can simply extend Sequel::Dataset with the same #with_progress method

Instance Method Summary collapse

Instance Method Details

#with_progress(options = {}) ⇒ Object Also known as: tqdm

Returns a clone of self where all calls to #each and related methods will print an animated progress bar while iterating.

Parameters:

  • options (Hash) (defaults to: {})

    options are the same as Enumerable#with_progress

See Also:



21
22
23
# File 'lib/tqdm/sequel.rb', line 21

def with_progress(options = {})
  Tqdm::Decorator.new(self, options).enhance
end