Class: Orgrep::Grep

Inherits:
Object
  • Object
show all
Defined in:
lib/orgrep/grep.rb

Overview

grep class of orgrep

Instance Method Summary collapse

Instance Method Details

#search(search_words) ⇒ Object



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/orgrep/grep.rb', line 9

def search(search_words)
  # TODO: raise error when repositories are not registered
  # === initial setup ===
  puts("=== initial setup ===")
  fork_unforked_services
  # === setup ===
  puts("=== setup ===")
  git_stash_files
  fetch_origin_head_name
  # execute service
  puts("=== running ===")
  # TODO: export as csv file in executed path
  specified_search_words = SearchWordList.words(search_words)
  print(export_as_csv(specified_search_words))
  # === clean up ===
  puts("=== clean up ===")
  git_stash_pop_files
end