{"id":23353574,"url":"https://github.com/omgreenfield/omg-attrs","last_synced_at":"2026-05-01T22:31:36.171Z","repository":{"id":241001818,"uuid":"804040845","full_name":"omgreenfield/omg-attrs","owner":"omgreenfield","description":"A simple Ruby object/attribute querying tool, kind of like jq.","archived":false,"fork":false,"pushed_at":"2026-02-04T01:27:54.000Z","size":44,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-04T13:34:11.633Z","etag":null,"topics":["rails","ruby"],"latest_commit_sha":null,"homepage":"https://rubygems.org/gems/omg-attrs","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/omgreenfield.png","metadata":{"files":{"readme":"README.md","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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-05-21T20:56:23.000Z","updated_at":"2026-02-04T01:27:57.000Z","dependencies_parsed_at":"2024-05-21T22:23:48.473Z","dependency_job_id":"e13273d5-65b5-454d-aa66-0ab9569736c6","html_url":"https://github.com/omgreenfield/omg-attrs","commit_stats":null,"previous_names":["omgreenfield/attrs"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/omgreenfield/omg-attrs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omgreenfield%2Fomg-attrs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omgreenfield%2Fomg-attrs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omgreenfield%2Fomg-attrs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omgreenfield%2Fomg-attrs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/omgreenfield","download_url":"https://codeload.github.com/omgreenfield/omg-attrs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omgreenfield%2Fomg-attrs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32515837,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"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":["rails","ruby"],"created_at":"2024-12-21T09:14:24.703Z","updated_at":"2026-05-01T22:31:36.160Z","avatar_url":"https://github.com/omgreenfield.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"- [Installation](#installation)\n  - [From RubyGems.org](#from-rubygemsorg)\n    - [Globally](#globally)\n    - [In `Gemfile`](#in-gemfile)\n  - [Locally](#locally)\n- [Usage](#usage)\n- [Development](#development)\n  - [Installation](#installation-1)\n  - [Console](#console)\n  - [Test](#test)\n\n## Installation\n\n### From RubyGems.org\n\n#### Globally\n\n```sh\ngem i omg-attrs\n```\n\n#### In `Gemfile`\n\n```ruby\ngem 'omg-attrs'\n```\n\n### Locally\n\n```sh\n# Build gem\ngem build omg-attrs.gemspec\n\n# Install gem\ngem i -l /path/to/this/folder/omg-attrs-\u003cversion\u003e.gem\n```\n\nOr in a `Gemfile`\n\n```ruby\ngem 'omg-attrs', path: '/path/to/this/folder'\n```\n\n## Usage\n\n```ruby\nrequire 'omg-attrs'\n\ndad_hash = {\n  age: 36,\n  hair_color: 'brown',\n  children: [\n    { age: 4, hair_color: 'blonde' },\n    { age: 8, hair_color: 'brown' }\n  ],\n  wife: { age: 37, hair_color: 'brown' }\n}\n\ndad_hash.attrs(:age) # =\u003e { age: 36 }\n\ndad_hash.attrs(wife: :age, children: [:count, :age])\n=\u003e {\n  wife: {\n    age: 36\n  },\n  children: {\n    count: 2,\n    items: [\n      { age: 8 },\n      { age: 4 },\n    ],\n  },\n}\n\ndad_hash.attrs_match?(age: 36, hair_color: 'brown') # =\u003e true\ndad_hash.children.find_by(age: 4) # =\u003e { age: 4, hair_color: 'brown' }\ndad_hash.children.where(hair_color: 'brown') # =\u003e [{ age: 4, hair_color: 'brown' }]\n```\n\n## Development\n\n### Installation\n\n```sh\nbin/install\n```\n\n### Console\n\n```sh\nbin/console\n```\n\n### Test\n\n```sh\nrspec\n# or\nbundle exec rspec\n# or\nguard\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fomgreenfield%2Fomg-attrs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fomgreenfield%2Fomg-attrs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fomgreenfield%2Fomg-attrs/lists"}