Class: GhBbAudit::KeywordsList

Inherits:
Object
  • Object
show all
Defined in:
lib/gh_bb_audit/keywords_list.rb

Instance Method Summary collapse

Constructor Details

#initialize(path_to_csv_file) ⇒ KeywordsList

Returns a new instance of KeywordsList.



4
5
6
# File 'lib/gh_bb_audit/keywords_list.rb', line 4

def initialize(path_to_csv_file)
  @keywords_csv_file_path = path_to_csv_file
end

Instance Method Details

#all_keywordsObject



8
9
10
11
# File 'lib/gh_bb_audit/keywords_list.rb', line 8

def all_keywords
  #Not rescuing here, as we should crash if we can not get keywords
  @keywords ||= ::CSV.read(@keywords_csv_file_path).flatten.uniq 
end