#[derive(Default, Clone)]
pub struct PropertyPath(String);
impl PropertyPath {
pub fn push(
&self,
str: &str,
) -> PropertyPath {
if self.0.is_empty() {
PropertyPath(str.to_string())
} else if str.is_empty() {
PropertyPath(self.0.to_string())
} else {
PropertyPath(format!("{}.{}", self.0, str))
}
}
pub fn path(&self) -> &str {
&self.0
}
}