{"action":"closed","number":18,"pull_request":{"url":"https://api.github.com/repos/Shopify/measured/pulls/18","id":39499183,"html_url":"https://github.com/Shopify/measured/pull/18","diff_url":"https://github.com/Shopify/measured/pull/18.diff","patch_url":"https://github.com/Shopify/measured/pull/18.patch","issue_url":"https://api.github.com/repos/Shopify/measured/issues/18","number":18,"state":"closed","locked":false,"title":"Allow initialization from module","user":{"login":"kmcphillips","id":84159,"avatar_url":"https://avatars.githubusercontent.com/u/84159?v=3","gravatar_id":"","url":"https://api.github.com/users/kmcphillips","html_url":"https://github.com/kmcphillips","followers_url":"https://api.github.com/users/kmcphillips/followers","following_url":"https://api.github.com/users/kmcphillips/following{/other_user}","gists_url":"https://api.github.com/users/kmcphillips/gists{/gist_id}","starred_url":"https://api.github.com/users/kmcphillips/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kmcphillips/subscriptions","organizations_url":"https://api.github.com/users/kmcphillips/orgs","repos_url":"https://api.github.com/users/kmcphillips/repos","events_url":"https://api.github.com/users/kmcphillips/events{/privacy}","received_events_url":"https://api.github.com/users/kmcphillips/received_events","type":"User","site_admin":false},"body":"@garethson @cyprusad @mdking \r\n\r\nFixed a bit of syntax sugar that I have wanted for a while.\r\n\r\nSimilar to how you can initialize a `BigDecimal(123)` without the `.new` I have added some metaprogramming to allow that for any subclasses of `Measured` in the namespace.\r\n\r\n```ruby\r\nMeasured::Length(1, :cm)\r\n```","created_at":"2015-07-08T16:56:42Z","updated_at":"2015-07-08T17:39:50Z","closed_at":"2015-07-08T17:39:49Z","merged_at":"2015-07-08T17:39:49Z","merge_commit_sha":"3f01a8ee8207982b957f8b821c6f4a8eba4f9f97","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Shopify/measured/pulls/18/commits","review_comments_url":"https://api.github.com/repos/Shopify/measured/pulls/18/comments","review_comment_url":"https://api.github.com/repos/Shopify/measured/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Shopify/measured/issues/18/comments","statuses_url":"https://api.github.com/repos/Shopify/measured/statuses/d984028a2994d22a5eba681bc7ae9ce922e05759","head":{"label":"Shopify:initialize-module","ref":"initialize-module","sha":"d984028a2994d22a5eba681bc7ae9ce922e05759","user":{"login":"Shopify","id":8085,"avatar_url":"https://avatars.githubusercontent.com/u/8085?v=3","gravatar_id":"","url":"https://api.github.com/users/Shopify","html_url":"https://github.com/Shopify","followers_url":"https://api.github.com/users/Shopify/followers","following_url":"https://api.github.com/users/Shopify/following{/other_user}","gists_url":"https://api.github.com/users/Shopify/gists{/gist_id}","starred_url":"https://api.github.com/users/Shopify/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Shopify/subscriptions","organizations_url":"https://api.github.com/users/Shopify/orgs","repos_url":"https://api.github.com/users/Shopify/repos","events_url":"https://api.github.com/users/Shopify/events{/privacy}","received_events_url":"https://api.github.com/users/Shopify/received_events","type":"Organization","site_admin":false},"repo":{"id":31614166,"name":"measured","full_name":"Shopify/measured","owner":{"login":"Shopify","id":8085,"avatar_url":"https://avatars.githubusercontent.com/u/8085?v=3","gravatar_id":"","url":"https://api.github.com/users/Shopify","html_url":"https://github.com/Shopify","followers_url":"https://api.github.com/users/Shopify/followers","following_url":"https://api.github.com/users/Shopify/following{/other_user}","gists_url":"https://api.github.com/users/Shopify/gists{/gist_id}","starred_url":"https://api.github.com/users/Shopify/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Shopify/subscriptions","organizations_url":"https://api.github.com/users/Shopify/orgs","repos_url":"https://api.github.com/users/Shopify/repos","events_url":"https://api.github.com/users/Shopify/events{/privacy}","received_events_url":"https://api.github.com/users/Shopify/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Shopify/measured","description":"Encapsulate measurements and their units in Ruby.","fork":false,"url":"https://api.github.com/repos/Shopify/measured","forks_url":"https://api.github.com/repos/Shopify/measured/forks","keys_url":"https://api.github.com/repos/Shopify/measured/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Shopify/measured/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Shopify/measured/teams","hooks_url":"https://api.github.com/repos/Shopify/measured/hooks","issue_events_url":"https://api.github.com/repos/Shopify/measured/issues/events{/number}","events_url":"https://api.github.com/repos/Shopify/measured/events","assignees_url":"https://api.github.com/repos/Shopify/measured/assignees{/user}","branches_url":"https://api.github.com/repos/Shopify/measured/branches{/branch}","tags_url":"https://api.github.com/repos/Shopify/measured/tags","blobs_url":"https://api.github.com/repos/Shopify/measured/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Shopify/measured/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Shopify/measured/git/refs{/sha}","trees_url":"https://api.github.com/repos/Shopify/measured/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Shopify/measured/statuses/{sha}","languages_url":"https://api.github.com/repos/Shopify/measured/languages","stargazers_url":"https://api.github.com/repos/Shopify/measured/stargazers","contributors_url":"https://api.github.com/repos/Shopify/measured/contributors","subscribers_url":"https://api.github.com/repos/Shopify/measured/subscribers","subscription_url":"https://api.github.com/repos/Shopify/measured/subscription","commits_url":"https://api.github.com/repos/Shopify/measured/commits{/sha}","git_commits_url":"https://api.github.com/repos/Shopify/measured/git/commits{/sha}","comments_url":"https://api.github.com/repos/Shopify/measured/comments{/number}","issue_comment_url":"https://api.github.com/repos/Shopify/measured/issues/comments{/number}","contents_url":"https://api.github.com/repos/Shopify/measured/contents/{+path}","compare_url":"https://api.github.com/repos/Shopify/measured/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Shopify/measured/merges","archive_url":"https://api.github.com/repos/Shopify/measured/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Shopify/measured/downloads","issues_url":"https://api.github.com/repos/Shopify/measured/issues{/number}","pulls_url":"https://api.github.com/repos/Shopify/measured/pulls{/number}","milestones_url":"https://api.github.com/repos/Shopify/measured/milestones{/number}","notifications_url":"https://api.github.com/repos/Shopify/measured/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Shopify/measured/labels{/name}","releases_url":"https://api.github.com/repos/Shopify/measured/releases{/id}","created_at":"2015-03-03T18:29:09Z","updated_at":"2015-07-08T16:40:54Z","pushed_at":"2015-07-08T17:39:50Z","git_url":"git://github.com/Shopify/measured.git","ssh_url":"git@github.com:Shopify/measured.git","clone_url":"https://github.com/Shopify/measured.git","svn_url":"https://github.com/Shopify/measured","homepage":"","size":364,"stargazers_count":7,"watchers_count":7,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":7,"default_branch":"master"}},"base":{"label":"Shopify:master","ref":"master","sha":"5e058aabff0228fbb3ddd12cf73cf531aad0760f","user":{"login":"Shopify","id":8085,"avatar_url":"https://avatars.githubusercontent.com/u/8085?v=3","gravatar_id":"","url":"https://api.github.com/users/Shopify","html_url":"https://github.com/Shopify","followers_url":"https://api.github.com/users/Shopify/followers","following_url":"https://api.github.com/users/Shopify/following{/other_user}","gists_url":"https://api.github.com/users/Shopify/gists{/gist_id}","starred_url":"https://api.github.com/users/Shopify/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Shopify/subscriptions","organizations_url":"https://api.github.com/users/Shopify/orgs","repos_url":"https://api.github.com/users/Shopify/repos","events_url":"https://api.github.com/users/Shopify/events{/privacy}","received_events_url":"https://api.github.com/users/Shopify/received_events","type":"Organization","site_admin":false},"repo":{"id":31614166,"name":"measured","full_name":"Shopify/measured","owner":{"login":"Shopify","id":8085,"avatar_url":"https://avatars.githubusercontent.com/u/8085?v=3","gravatar_id":"","url":"https://api.github.com/users/Shopify","html_url":"https://github.com/Shopify","followers_url":"https://api.github.com/users/Shopify/followers","following_url":"https://api.github.com/users/Shopify/following{/other_user}","gists_url":"https://api.github.com/users/Shopify/gists{/gist_id}","starred_url":"https://api.github.com/users/Shopify/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Shopify/subscriptions","organizations_url":"https://api.github.com/users/Shopify/orgs","repos_url":"https://api.github.com/users/Shopify/repos","events_url":"https://api.github.com/users/Shopify/events{/privacy}","received_events_url":"https://api.github.com/users/Shopify/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Shopify/measured","description":"Encapsulate measurements and their units in Ruby.","fork":false,"url":"https://api.github.com/repos/Shopify/measured","forks_url":"https://api.github.com/repos/Shopify/measured/forks","keys_url":"https://api.github.com/repos/Shopify/measured/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Shopify/measured/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Shopify/measured/teams","hooks_url":"https://api.github.com/repos/Shopify/measured/hooks","issue_events_url":"https://api.github.com/repos/Shopify/measured/issues/events{/number}","events_url":"https://api.github.com/repos/Shopify/measured/events","assignees_url":"https://api.github.com/repos/Shopify/measured/assignees{/user}","branches_url":"https://api.github.com/repos/Shopify/measured/branches{/branch}","tags_url":"https://api.github.com/repos/Shopify/measured/tags","blobs_url":"https://api.github.com/repos/Shopify/measured/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Shopify/measured/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Shopify/measured/git/refs{/sha}","trees_url":"https://api.github.com/repos/Shopify/measured/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Shopify/measured/statuses/{sha}","languages_url":"https://api.github.com/repos/Shopify/measured/languages","stargazers_url":"https://api.github.com/repos/Shopify/measured/stargazers","contributors_url":"https://api.github.com/repos/Shopify/measured/contributors","subscribers_url":"https://api.github.com/repos/Shopify/measured/subscribers","subscription_url":"https://api.github.com/repos/Shopify/measured/subscription","commits_url":"https://api.github.com/repos/Shopify/measured/commits{/sha}","git_commits_url":"https://api.github.com/repos/Shopify/measured/git/commits{/sha}","comments_url":"https://api.github.com/repos/Shopify/measured/comments{/number}","issue_comment_url":"https://api.github.com/repos/Shopify/measured/issues/comments{/number}","contents_url":"https://api.github.com/repos/Shopify/measured/contents/{+path}","compare_url":"https://api.github.com/repos/Shopify/measured/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Shopify/measured/merges","archive_url":"https://api.github.com/repos/Shopify/measured/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Shopify/measured/downloads","issues_url":"https://api.github.com/repos/Shopify/measured/issues{/number}","pulls_url":"https://api.github.com/repos/Shopify/measured/pulls{/number}","milestones_url":"https://api.github.com/repos/Shopify/measured/milestones{/number}","notifications_url":"https://api.github.com/repos/Shopify/measured/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Shopify/measured/labels{/name}","releases_url":"https://api.github.com/repos/Shopify/measured/releases{/id}","created_at":"2015-03-03T18:29:09Z","updated_at":"2015-07-08T16:40:54Z","pushed_at":"2015-07-08T17:39:50Z","git_url":"git://github.com/Shopify/measured.git","ssh_url":"git@github.com:Shopify/measured.git","clone_url":"https://github.com/Shopify/measured.git","svn_url":"https://github.com/Shopify/measured","homepage":"","size":364,"stargazers_count":7,"watchers_count":7,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Shopify/measured/pulls/18"},"html":{"href":"https://github.com/Shopify/measured/pull/18"},"issue":{"href":"https://api.github.com/repos/Shopify/measured/issues/18"},"comments":{"href":"https://api.github.com/repos/Shopify/measured/issues/18/comments"},"review_comments":{"href":"https://api.github.com/repos/Shopify/measured/pulls/18/comments"},"review_comment":{"href":"https://api.github.com/repos/Shopify/measured/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Shopify/measured/pulls/18/commits"},"statuses":{"href":"https://api.github.com/repos/Shopify/measured/statuses/d984028a2994d22a5eba681bc7ae9ce922e05759"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"kmcphillips","id":84159,"avatar_url":"https://avatars.githubusercontent.com/u/84159?v=3","gravatar_id":"","url":"https://api.github.com/users/kmcphillips","html_url":"https://github.com/kmcphillips","followers_url":"https://api.github.com/users/kmcphillips/followers","following_url":"https://api.github.com/users/kmcphillips/following{/other_user}","gists_url":"https://api.github.com/users/kmcphillips/gists{/gist_id}","starred_url":"https://api.github.com/users/kmcphillips/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kmcphillips/subscriptions","organizations_url":"https://api.github.com/users/kmcphillips/orgs","repos_url":"https://api.github.com/users/kmcphillips/repos","events_url":"https://api.github.com/users/kmcphillips/events{/privacy}","received_events_url":"https://api.github.com/users/kmcphillips/received_events","type":"User","site_admin":false},"comments":4,"review_comments":4,"commits":2,"additions":38,"deletions":1,"changed_files":5}}