class LessonsIndexer::Starter

Attributes

options[R]

Public Class Methods

new(argv) click to toggle source
# File lib/lessons_indexer/starter.rb, line 5
def initialize(argv)
  @options = Options.new(argv)
end

Public Instance Methods

start!() click to toggle source
# File lib/lessons_indexer/starter.rb, line 9
def start!
  with_messages(pou('starter.welcome', version: LessonsIndexer::VERSION), pou('starter.done'), false) do
    indexer = Indexer.new(options)

    within options.path do
      if options.all
        brancher = GitManager::Brancher.new
        brancher.get_branches.each do |branch|
          brancher.within_branch branch do
            indexer.do_work!
          end
        end
      else
        indexer.do_work!
      end
    end
  end
end