{"id":28509123,"url":"https://github.com/atomicobject/constructor","last_synced_at":"2025-07-02T23:31:53.012Z","repository":{"id":740431,"uuid":"391173","full_name":"atomicobject/constructor","owner":"atomicobject","description":"Declarative named-argument object initialization","archived":false,"fork":false,"pushed_at":"2013-11-21T05:03:37.000Z","size":712,"stargazers_count":12,"open_issues_count":2,"forks_count":2,"subscribers_count":27,"default_branch":"master","last_synced_at":"2025-06-08T22:08:04.294Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://atomicobject.github.com/constructor","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/atomicobject.png","metadata":{"files":{"readme":"README.rdoc","changelog":"History.rdoc","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-12-01T06:12:45.000Z","updated_at":"2024-11-28T16:27:49.000Z","dependencies_parsed_at":"2022-08-16T10:45:25.316Z","dependency_job_id":null,"html_url":"https://github.com/atomicobject/constructor","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/atomicobject/constructor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atomicobject%2Fconstructor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atomicobject%2Fconstructor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atomicobject%2Fconstructor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atomicobject%2Fconstructor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/atomicobject","download_url":"https://codeload.github.com/atomicobject/constructor/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atomicobject%2Fconstructor/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263232701,"owners_count":23434722,"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":"2025-06-08T22:07:29.337Z","updated_at":"2025-07-02T23:31:52.988Z","avatar_url":"https://github.com/atomicobject.png","language":"Ruby","readme":"== Constructor\n\n* http://atomicobject.github.com/constructor\n\n== Description\n  \nDeclarative means to define object properties by passing a hash \nto the constructor, which will set the corresponding ivars.\n\n== Synopsis\n\n  require 'constructor'\n\n  class Horse\n    constructor :name, :breed, :weight\n  end\n  Horse.new :name =\u003e 'Ed', :breed =\u003e 'Mustang', :weight =\u003e 342\n\nBy default the ivars do not get accessors defined.\nBut you can get them auto-made if you want:\n\n  class Horse\n    constructor :name, :breed, :weight, :accessors =\u003e true\n  end\n  ...\n  puts my_horse.weight\n \nArguments specified are required by default.  You can disable \nstrict argument checking with :strict option.  This means that \nthe constructor will not raise an error if you pass more or \nfewer arguments than declared.\n\n  class Donkey\n    constructor :age, :odor, :strict =\u003e false\n  end\n\n... this allows you to pass either an age or odor key (or neither)\nto the Donkey constructor.\n\n\n== Requirements\n\n* rubygems\n\n== Install\n\n* gem install constructor\n\n== Authors\n\n* David Crosby (crosby@atomicobject.com)\n* Patrick Bacon (bacon@atomicobject.com)\n* © 2007-2011 {Atomic Object}[http://www.atomicobject.com]\n* More Atomic Object {open source}[http://www.atomicobject.com/pages/Software+Commons] projects\n\n== License\n\n(The MIT License)\n\nCopyright (c) 2007-2011 Atomic Object\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatomicobject%2Fconstructor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fatomicobject%2Fconstructor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatomicobject%2Fconstructor/lists"}