Przeglądaj źródła

Add as_property_groups helper function to Elements

Billy Barrow 1 miesiąc temu
rodzic
commit
a1b44df270
1 zmienionych plików z 4 dodań i 0 usunięć
  1. 4 0
      src/lib/Elements.vala

+ 4 - 0
src/lib/Elements.vala

@@ -28,6 +28,10 @@ namespace InvercargillJson {
             return select<JsonObject>(n => new JsonObject.from_existing(n.assert_as<Json.Node>().get_object()));
         }
 
+        public virtual PropertyGroups as_property_groups() {
+            return as_objects().promote_to<PropertyGroups>();
+        }
+
         public virtual JsonArray to_json_array() {
             var array = new JsonArray();
             array.add_all((Enumerable<JsonElement>)this);