use {
super::Css,
crate::fh::{FileHierarchy, Level},
std::path::PathBuf,
};
pub struct CssBuilder {
fh: FileHierarchy,
exclude_files: Vec<PathBuf>,
id: String,
level: Level,
}
impl CssBuilder {
pub fn new(id: &str, level: Level) -> Self {
Self {
id: id.to_string(),
level,
fh: FileHierarchy::new(),
exclude_files: vec![],
}
}
pub fn file_hierarchy(mut self, fh: FileHierarchy) -> Self {
self.fh = fh;
self
}
pub fn exclude_files(mut self, files: Vec<PathBuf>) -> Self {
self.exclude_files = files;
self
}
pub fn build(self) -> Css {
Css {
fh: self.fh,
exclude_files: self.exclude_files,
id: self.id,
level: self.level,
}
}
}