diff options
| author | Ruben Beltran del Rio <ruben@unlimited.pizza> | 2023-04-16 14:44:48 +0200 |
|---|---|---|
| committer | Ruben Beltran del Rio <ruben@unlimited.pizza> | 2023-04-16 14:44:48 +0200 |
| commit | 68fa37d61babe8d990ace5f9cb5a7de81eb57ea0 (patch) | |
| tree | 33820a288918b2a75b77b6ca69a0169ea94b84e5 /src/file_handler/mod.rs | |
| parent | 4cbe65303a0e5d6060c3b608fb69181feda8b8d3 (diff) | |
Add gemini parsing
Diffstat (limited to 'src/file_handler/mod.rs')
| -rw-r--r-- | src/file_handler/mod.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/file_handler/mod.rs b/src/file_handler/mod.rs index 64224ee..a106c27 100644 --- a/src/file_handler/mod.rs +++ b/src/file_handler/mod.rs @@ -58,7 +58,8 @@ impl FileHandler { pub fn handle(&self, source: &PathBuf, destination: &PathBuf, file: &File) { for strategy in self.strategies.iter() { if strategy.can_handle(&file.file_type) { - return strategy.handle(source, destination, file); + let layout = self.layout.as_ref().unwrap(); + return strategy.handle(source, destination, file, layout); } } } @@ -68,7 +69,7 @@ pub trait FileHandlerStrategy { fn is(&self, path: &PathBuf) -> bool; fn identify(&self) -> FileType; fn can_handle(&self, file_type: &FileType) -> bool; - fn handle(&self, source: &PathBuf, destination: &PathBuf, file: &File); + fn handle(&self, source: &PathBuf, destination: &PathBuf, file: &File, layout: &String); } pub enum FileType { |