Class: Yoda::Store::Actions::ReadProjectFiles
- Inherits:
-
Object
- Object
- Yoda::Store::Actions::ReadProjectFiles
- Defined in:
- lib/yoda/store/actions/read_project_files.rb
Instance Attribute Summary collapse
- #registry ⇒ Registry readonly
- #root_path ⇒ String readonly
Instance Method Summary collapse
-
#initialize(registry, root_path) ⇒ ReadProjectFiles
constructor
A new instance of ReadProjectFiles.
- #run ⇒ Object
Constructor Details
#initialize(registry, root_path) ⇒ ReadProjectFiles
Returns a new instance of ReadProjectFiles.
11 12 13 14 |
# File 'lib/yoda/store/actions/read_project_files.rb', line 11 def initialize(registry, root_path) @registry = registry @root_path = root_path end |
Instance Attribute Details
#registry ⇒ Registry (readonly)
6 7 8 |
# File 'lib/yoda/store/actions/read_project_files.rb', line 6 def registry @registry end |
#root_path ⇒ String (readonly)
9 10 11 |
# File 'lib/yoda/store/actions/read_project_files.rb', line 9 def root_path @root_path end |
Instance Method Details
#run ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/yoda/store/actions/read_project_files.rb', line 16 def run files = project_files progress = Instrument::Progress.new(files.length) do |index:, length:| Instrument.instance.initialization_progress(phase: :load_project_files, message: "Loading current project files (#{index} / #{length})", index: index, length: length) end files.each do |file| ReadFile.run(registry, file) progress.increment end end |