Module: Coconductor::Projects::Project
- Included in:
- FSProject, GitHubProject, GitProject
- Defined in:
- lib/coconductor/projects/project.rb
Constant Summary collapse
- DIRS =
['./', './docs/', './.github/'].freeze
Instance Method Summary collapse
Instance Method Details
#code_of_conduct ⇒ Object
8 9 10 |
# File 'lib/coconductor/projects/project.rb', line 8 def code_of_conduct code_of_conduct_file&.code_of_conduct end |
#code_of_conduct_file ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/coconductor/projects/project.rb', line 12 def code_of_conduct_file return @code_of_conduct_file if defined? @code_of_conduct_file return if files.nil? || files.empty? file = find_files do |filename| ProjectFiles::CodeOfConductFile.name_score(filename) end.first return unless file content = load_file(file) @code_of_conduct_file = begin ProjectFiles::CodeOfConductFile.new(content, file) end end |