diff --git a/01.workspace/heave/src/str/entity.rs b/01.workspace/heave/src/str/entity.rs index e61f730..5eb8609 100644 --- a/01.workspace/heave/src/str/entity.rs +++ b/01.workspace/heave/src/str/entity.rs @@ -18,4 +18,11 @@ impl O { self.attributes.insert(attribute.id.clone(), attribute); self } + pub fn value_of(&self, id: &str) -> Option<&Value> { + let attribute = self.attributes.get(id); + match attribute { + None => None, + Some(attribute) => Some(&attribute.value), + } + } }