{"id":16925416,"url":"https://github.com/alejandrodevs/sphene","last_synced_at":"2025-03-21T01:28:33.631Z","repository":{"id":56896597,"uuid":"444962978","full_name":"alejandrodevs/sphene","owner":"alejandrodevs","description":"Simple and lightweight gem for class attributes.","archived":false,"fork":false,"pushed_at":"2022-04-02T06:02:02.000Z","size":31,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-28T17:49:21.668Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alejandrodevs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2022-01-05T22:04:16.000Z","updated_at":"2022-01-20T05:39:23.000Z","dependencies_parsed_at":"2022-08-21T01:20:34.710Z","dependency_job_id":null,"html_url":"https://github.com/alejandrodevs/sphene","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alejandrodevs%2Fsphene","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alejandrodevs%2Fsphene/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alejandrodevs%2Fsphene/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alejandrodevs%2Fsphene/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alejandrodevs","download_url":"https://codeload.github.com/alejandrodevs/sphene/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244720454,"owners_count":20498799,"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":[],"created_at":"2024-10-13T20:10:35.217Z","updated_at":"2025-03-21T01:28:33.609Z","avatar_url":"https://github.com/alejandrodevs.png","language":"Ruby","readme":"# Sphene\n\nThis gem aims to provide a lightweight and simple implementation of typed attributes. it implements a lazy attribute casting.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'sphene'\n```\n\nAnd then execute:\n\n    $ bundle install\n\nOr install it yourself as:\n\n    $ gem install sphene\n\n## Usage\n\nJust include `Sphene::Attributes` in your class and define your\nattributes:\n\n```ruby\nclass User\n  include Sphene::Attributes\n\n  attribute :name, Types::String\n  attribute :email, Types::String\n  attribute :active, Types::Boolean, default: true\n  attribute :digest, Types::Integer, default: -\u003e { Random.srand }\nend\n```\n\nCheck the types available here: [Types](https://github.com/alejandrodevs/sphene/blob/master/lib/sphene/types.rb)\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` 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 the created tag, 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/alejandrodevs/sphene. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/alejandrodevs/sphene/blob/master/CODE_OF_CONDUCT.md).\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n\n## Code of Conduct\n\nEveryone interacting in the Sphene project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/alejandrodevs/sphene/blob/master/CODE_OF_CONDUCT.md).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falejandrodevs%2Fsphene","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falejandrodevs%2Fsphene","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falejandrodevs%2Fsphene/lists"}