{"id":21921816,"url":"https://github.com/existentialmutt/kstruct","last_synced_at":"2025-07-23T08:05:51.591Z","repository":{"id":56880514,"uuid":"51893837","full_name":"existentialmutt/kstruct","owner":"existentialmutt","description":"a lightweight ruby struct that accepts keyword arguments","archived":false,"fork":false,"pushed_at":"2021-07-18T20:15:22.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-15T14:07:37.765Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/existentialmutt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-02-17T04:11:23.000Z","updated_at":"2021-07-18T20:15:36.000Z","dependencies_parsed_at":"2022-08-20T23:10:38.907Z","dependency_job_id":null,"html_url":"https://github.com/existentialmutt/kstruct","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/existentialmutt/kstruct","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/existentialmutt%2Fkstruct","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/existentialmutt%2Fkstruct/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/existentialmutt%2Fkstruct/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/existentialmutt%2Fkstruct/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/existentialmutt","download_url":"https://codeload.github.com/existentialmutt/kstruct/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/existentialmutt%2Fkstruct/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266640831,"owners_count":23960809,"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-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"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-11-28T20:27:13.230Z","updated_at":"2025-07-23T08:05:51.570Z","avatar_url":"https://github.com/existentialmutt.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DEPRECATED\n\nI recommend you use `Struct.new(..., keyword_init: true)` \n\n# KStruct\n\nKStruct generates lightweight ruby classes with accessor methods and keyword initializers.  It's intended to be used in similar places to the Standard Library's Struct class.\n\nUnlike Struct, it does not not pollute subclasses with lots of methods.  The constructor and accessor methods are the only methods inherited.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'kstruct'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install kstruct\n\n## Usage\n\n```ruby\nrequire 'kstruct'\n\nclass Barrel \u003c KStruct.new(:fish)\n  def shoot!\n    fish.pop\n  end\nend\n\nbarrel = Barrel.new fish: [:trout, :salmon, :shark]\nbarrel.shoot! # =\u003e :shark\nbarrel.shoot! # =\u003e :salmon\nbarrel.shoot! # =\u003e :trout\nbarrel.shoot! # =\u003e nil\n\nbarrel.fish = [:swedish]\nbarrel.fish # =\u003e [:swedish]\n```\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/existentialmutt/kstruct. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](contributor-covenant.org) code of conduct.\n\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexistentialmutt%2Fkstruct","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fexistentialmutt%2Fkstruct","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexistentialmutt%2Fkstruct/lists"}