{"id":21593821,"url":"https://github.com/jasl-lab/options_model","last_synced_at":"2025-04-10T23:40:37.682Z","repository":{"id":22780496,"uuid":"97300010","full_name":"jasl-lab/options_model","owner":"jasl-lab","description":"An ActiveModel implementation that make easier to handle model which will be serialized in a real model.","archived":false,"fork":false,"pushed_at":"2023-03-08T19:46:07.000Z","size":107,"stargazers_count":2,"open_issues_count":6,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-25T12:03:29.022Z","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/jasl-lab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"MIT-LICENSE","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}},"created_at":"2017-07-15T07:35:32.000Z","updated_at":"2021-12-25T17:09:14.000Z","dependencies_parsed_at":"2024-11-24T17:14:50.904Z","dependency_job_id":"e3569f7b-bdf4-4424-a989-364218e8e9ae","html_url":"https://github.com/jasl-lab/options_model","commit_stats":{"total_commits":43,"total_committers":2,"mean_commits":21.5,"dds":"0.18604651162790697","last_synced_commit":"009dfd8969e02f2bfd5db18549c33773f70c6323"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jasl-lab%2Foptions_model","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jasl-lab%2Foptions_model/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jasl-lab%2Foptions_model/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jasl-lab%2Foptions_model/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jasl-lab","download_url":"https://codeload.github.com/jasl-lab/options_model/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248317732,"owners_count":21083525,"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-11-24T17:14:48.435Z","updated_at":"2025-04-10T23:40:37.648Z","avatar_url":"https://github.com/jasl-lab.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OptionsModel\n\nAn ActiveModel implementation that make easier to handle model which will be serialized in a real model.\n\nsupport attribute:\n\n- all types that `ActiveModel::Type` support\n- typed array\n- enum\n- embeds one\n\n## Usage\n\n```ruby\nclass Person \u003c OptionsModel::Base\n  attribute :name, :string\n  attribute :age, :integer\n\n  validates :name, presence: true\nend\n\nclass Book \u003c OptionsModel::Base\n  embeds_one :author, class_name: 'Person'\n\n  attribute :title,     :string\n  attribute :tags,      :string,   array:   true\n  attribute :price,     :decimal,  default: 0\n  attribute :bought_at, :datetime, default: -\u003e { Time.new } \n\n  validates :title, presence: true\nend\n```\n\n## Installation\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'options_model'\n```\n\nAnd then execute:\n```bash\n$ bundle\n```\n\n## Contributing\n\n1. Fork it\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create new Pull Request\n\nPlease write unit test with your code if necessary.\n\n## License\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%2Fjasl-lab%2Foptions_model","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjasl-lab%2Foptions_model","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjasl-lab%2Foptions_model/lists"}