use std::path::PathBuf;
#[derive(Debug, Clone)]
pub struct AppContext {
debug: bool,
working_dir: PathBuf,
}
impl AppContext {
pub fn new(debug: bool) -> Self {
let working_dir = std::env::current_dir().unwrap_or_else(|_| PathBuf::from("."));
Self { debug, working_dir }
}
pub fn debug(&self) -> bool {
self.debug
}
pub fn working_dir(&self) -> &PathBuf {
&self.working_dir
}
}