lib/capabilities_helper.rb in ambient-xcode-0.5.0 vs lib/capabilities_helper.rb in ambient-xcode-0.5.1
- old
+ new
@@ -48,9 +48,17 @@
def capabilities
target_attributes["SystemCapabilities"]
end
def target_attributes
+ unless @project.root_object.attributes["TargetAttributes"]
+ @project.root_object.attributes["TargetAttributes"] = {}
+ end
+
+ unless @project.root_object.attributes["TargetAttributes"][@target.uuid]
+ @project.root_object.attributes["TargetAttributes"][@target.uuid] = {}
+ end
+
@project.root_object.attributes["TargetAttributes"][@target.uuid]
end
def capability_key(capability)
capability = CAPABILITIES[capability] || capability.to_s