Class: GhBbAudit::OutputWriter
- Inherits:
-
Object
- Object
- GhBbAudit::OutputWriter
- Defined in:
- lib/gh_bb_audit/output_writer.rb
Instance Method Summary collapse
- #close ⇒ Object
- #file_paths_matched_in_repo(file_path_array, repo_name, user_name) ⇒ Object
-
#initialize(path_to_file) ⇒ OutputWriter
constructor
A new instance of OutputWriter.
- #repo_name_matched(repo_name, user_name) ⇒ Object
Constructor Details
#initialize(path_to_file) ⇒ OutputWriter
Returns a new instance of OutputWriter.
3 4 5 |
# File 'lib/gh_bb_audit/output_writer.rb', line 3 def initialize(path_to_file) @fhandle = File.open(path_to_file, 'w+') end |
Instance Method Details
#close ⇒ Object
22 23 24 |
# File 'lib/gh_bb_audit/output_writer.rb', line 22 def close @fhandle.close end |
#file_paths_matched_in_repo(file_path_array, repo_name, user_name) ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/gh_bb_audit/output_writer.rb', line 13 def file_paths_matched_in_repo(file_path_array,repo_name,user_name) @fhandle.puts("") @fhandle.puts("For the REPO::#{repo_name} for USER::#{user_name}, the following file paths matched") file_path_array.each do |file_path| @fhandle.puts("---- #{file_path}") end @fhandle.puts("") end |
#repo_name_matched(repo_name, user_name) ⇒ Object
7 8 9 10 11 |
# File 'lib/gh_bb_audit/output_writer.rb', line 7 def repo_name_matched(repo_name,user_name) @fhandle.puts("") @fhandle.puts("The name of REPO::#{repo_name} for USER::#{user_name} matches keywords") @fhandle.puts("") end |