Quellcode durchsuchen

Add as_property_groups helper function to Elements

Billy Barrow vor 1 Monat
Ursprung
Commit
a1b44df270
1 geänderte Dateien mit 4 neuen und 0 gelöschten Zeilen
  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);