Class: Mudguard::Infrastructure::Persistence::RubyFiles
- Inherits:
-
Object
- Object
- Mudguard::Infrastructure::Persistence::RubyFiles
- Defined in:
- lib/mudguard/infrastructure/persistence/ruby_files.rb
Overview
Provides access to all ruby-files of a project
Class Method Summary collapse
Class Method Details
.select(project_path, patterns: nil) ⇒ Object
12 13 14 15 16 17 18 19 20 21 |
# File 'lib/mudguard/infrastructure/persistence/ruby_files.rb', line 12 def select(project_path, patterns: nil) project_exists = Dir.exist?(project_path) unless project_exists raise Mudguard::Domain::Error, "expected project #{project_path} doesn't exists" end patterns = [File.join("**", "*.rb")] if patterns.nil? enumerate_files(project_path, patterns) end |