Module: Jekyll::Algolia::ProgressBar

Includes:
Jekyll::Algolia
Defined in:
lib/jekyll/algolia/progress_bar.rb

Overview

Module to push records to Algolia and configure the index

Constant Summary

Constants included from Jekyll::Algolia

MissingCredentialsError, VERSION

Class Method Summary collapse

Methods included from Jekyll::Algolia

init, load_overwrites, run, site

Class Method Details

.create(options) ⇒ Object



16
17
18
19
20
21
22
23
24
# File 'lib/jekyll/algolia/progress_bar.rb', line 16

def self.create(options)
  if should_be_silenced?
    fake_bar = OpenStruct.new
    fake_bar.increment = nil
    return fake_bar
  end

  ::ProgressBar.create(options)
end

.should_be_silenced?Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/jekyll/algolia/progress_bar.rb', line 12

def self.should_be_silenced?
  Configurator.verbose?
end