{"id":18450242,"url":"https://github.com/libsteve/aggregate","last_synced_at":"2026-05-12T07:39:10.161Z","repository":{"id":56901656,"uuid":"124007846","full_name":"libsteve/Aggregate","owner":"libsteve","description":"An aggregating object which can compose protocol implementations from various objects","archived":false,"fork":false,"pushed_at":"2018-03-06T19:02:53.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-29T17:59:00.612Z","etag":null,"topics":["ios","macos","objective-c","swift"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/libsteve.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-03-06T02:22:20.000Z","updated_at":"2018-03-06T02:43:22.000Z","dependencies_parsed_at":"2022-08-20T18:50:41.408Z","dependency_job_id":null,"html_url":"https://github.com/libsteve/Aggregate","commit_stats":null,"previous_names":["altece/aggregate","libsteve/aggregate"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libsteve%2FAggregate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libsteve%2FAggregate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libsteve%2FAggregate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libsteve%2FAggregate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/libsteve","download_url":"https://codeload.github.com/libsteve/Aggregate/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249167445,"owners_count":21223506,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ios","macos","objective-c","swift"],"created_at":"2024-11-06T07:24:06.412Z","updated_at":"2026-05-12T07:39:05.136Z","avatar_url":"https://github.com/libsteve.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"Aggregate\n=========\n\n`Aggregate` is an object which can compose protocol implementations from various objects\nThis can be useful for dividing large protocol implementations into separate objects,\nand then combining them here to pass to a client as a single delegate, data source, or object.\n\n```swift\nimport Aggregate\n\n@objc protocol Foo {\n    func doThis()\n}\n\n@objc protocol Bar {\n    func doThat()\n}\n\n@objc EagerBeaver: NSObject, Foo {\n    func doThis() {\n        print(\"I did this!\")\n    }\n}\n\n@objc Underachiever: NSObject, Foo, Bar {\n    func doThis() {\n        print(\"Do I have to do this?\")\n    }\n\n    func doThat() {\n        print(\"Do I have to do that?\")\n    }\n}\n\nlet averageJoe = Aggregate(of: [EagerBeaver(), Underachiever()]) as! Foo \u0026 Bar\n\naverageJoe.doThis() // prints \"I did this!\"\naverageJoe.doThat() // prints \"Do I have to do that?\"\n```\n\nIt is important to note that the order of objects in the `targets` array denotes the calling \norder for composed objects with duplicate method implementations, where the first target\nhas the highest prioritization. This is why `Underachiever`'s `doThis` implementation wasn't\ncalled in the previous example.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flibsteve%2Faggregate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flibsteve%2Faggregate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flibsteve%2Faggregate/lists"}