Module: Orgrep

Defined in:
lib/orgrep.rb,
lib/orgrep/grep.rb,
lib/orgrep/init.rb,
lib/orgrep/version.rb,
lib/orgrep/repository.rb,
lib/orgrep/search_word_list.rb

Overview

Main class of Orgrep it is called from exec/orgrep.rb

Defined Under Namespace

Classes: Grep, Init, Repository, SearchWordList

Constant Summary collapse

SPECIFIED_REPOSITORY_TXT_PATH =
File.join("./repositories.txt")
SPECIFIED_SEARCH_WORDS_TXT_PATH =
File.join("./search_words.txt")
ENV_PATH =
File.join("./.env")
VERSION =
"0.1.0"

Class Method Summary collapse

Class Method Details

.run(argv) ⇒ Object



19
20
21
22
23
24
25
26
# File 'lib/orgrep.rb', line 19

def self.run(argv)
  case argv[0]
  when "init"
    Orgrep::Init.setup
  when "search"
    Orgrep::Grep.new.search(argv[1...])
  end
end