Class: Bonobot::LocalFilesRegistry
- Inherits:
-
Object
- Object
- Bonobot::LocalFilesRegistry
- Includes:
- Configuration, Outputable, Reloadable
- Defined in:
- lib/bonobot/local_files_registry.rb
Class Method Summary collapse
Methods included from Reloadable
Methods included from Outputable
Methods included from Configuration
Class Method Details
.all ⇒ Object
9 10 11 12 |
# File 'lib/bonobot/local_files_registry.rb', line 9 def self.all @all ||= Parallel.map(Dir.glob(root.join("**", "*.#{file_pattern}"))) { |path| LocalFile.new(path, ::Rails.root) } .reject { |local_file| configuration.excluded_files.include?(local_file.path) } end |
.file_pattern ⇒ Object
18 19 20 |
# File 'lib/bonobot/local_files_registry.rb', line 18 def self.file_pattern configuration.files_pattern end |
.root ⇒ Object
14 15 16 |
# File 'lib/bonobot/local_files_registry.rb', line 14 def self.root ::Rails.root.join(configuration.included_dirs) end |