Skip to content

Commit

Permalink
add support for adding a question as argument, wip - setting a profile
Browse files Browse the repository at this point in the history
  • Loading branch information
aprxi committed Aug 6, 2024
1 parent 66c71b2 commit 08c8b57
Show file tree
Hide file tree
Showing 16 changed files with 548 additions and 148 deletions.
14 changes: 13 additions & 1 deletion lumni/src/apps/api/env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,15 @@ use std::path::PathBuf;
#[derive(Debug, Clone)]
pub struct ApplicationEnv {
config_dir: Option<PathBuf>,
prog_name: Option<String>,
}

impl ApplicationEnv {
pub fn new() -> ApplicationEnv {
ApplicationEnv { config_dir: None }
ApplicationEnv {
config_dir: None,
prog_name: None,
}
}

pub fn set_config_dir(&mut self, config_dir: PathBuf) {
Expand All @@ -17,4 +21,12 @@ impl ApplicationEnv {
pub fn get_config_dir(&self) -> Option<&PathBuf> {
self.config_dir.as_ref()
}

pub fn set_prog_name(&mut self, program_name: String) {
self.prog_name = Some(program_name);
}

pub fn get_prog_name(&self) -> Option<&String> {
self.prog_name.as_ref()
}
}
Loading

0 comments on commit 08c8b57

Please sign in to comment.