{"id":15543823,"url":"https://github.com/amiel/collapse","last_synced_at":"2025-07-27T10:42:08.401Z","repository":{"id":548810,"uuid":"179010","full_name":"amiel/collapse","owner":"amiel","description":"collapse! merges a sub-hash with self while applying set union to any common arrays. See the example, it will make more sense.","archived":false,"fork":false,"pushed_at":"2009-04-18T08:57:49.000Z","size":84,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-28T22:48:06.215Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/amiel.png","metadata":{"files":{"readme":"README.textile","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2009-04-18T01:57:49.000Z","updated_at":"2019-08-13T14:19:02.000Z","dependencies_parsed_at":"2022-08-16T10:30:46.033Z","dependency_job_id":null,"html_url":"https://github.com/amiel/collapse","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/amiel/collapse","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amiel%2Fcollapse","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amiel%2Fcollapse/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amiel%2Fcollapse/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amiel%2Fcollapse/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/amiel","download_url":"https://codeload.github.com/amiel/collapse/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amiel%2Fcollapse/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267346521,"owners_count":24072631,"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","status":"online","status_checked_at":"2025-07-27T02:00:11.917Z","response_time":82,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-10-02T12:28:31.570Z","updated_at":"2025-07-27T10:42:08.383Z","avatar_url":"https://github.com/amiel.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"h2. Collapse\n\nThis gem adds a method @collapse!@ to Hash.\nUsing collapse! merges a sub-hash with self while applying set union to any common arrays.\n\nh2. Example\n\nh3. example_config.yml\n\n\u003cpre\u003e\n\u003ccode\u003e\n:foo:\n\t- a\n\t- b\n\t- d\n:bar:\n\t:foo:\n\t\t- b\n\t\t- d\n\t\t- e\n\u003c/code\u003e\n\u003c/pre\u003e\n\n\u003cpre\u003e\n\u003ccode\u003e\n\ttmp = YAML.load_file 'example_config.yml'\n\ttmp.inspect\t\t# =\u003e {:foo =\u003e ['a', 'b', 'd'], :bar =\u003e {:foo =\u003e ['b', 'd', 'e']}}\n\ttmp.collapse! :bar\n\ttmp.inspect\t\t# =\u003e {:foo =\u003e ['a', 'b', 'd', 'e']}\n\u003c/code\u003e\n\u003c/pre\u003e\n\n\nh2. Author\n\nAmiel Martin","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famiel%2Fcollapse","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famiel%2Fcollapse","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famiel%2Fcollapse/lists"}