{"action":"created","issue":{"url":"https://api.github.com/repos/rightscale/attributor/issues/31","labels_url":"https://api.github.com/repos/rightscale/attributor/issues/31/labels{/name}","comments_url":"https://api.github.com/repos/rightscale/attributor/issues/31/comments","events_url":"https://api.github.com/repos/rightscale/attributor/issues/31/events","html_url":"https://github.com/rightscale/attributor/issues/31","id":20983386,"number":31,"title":"Provide native_type for Attributor::Boolean","user":{"login":"justingaylor","id":635873,"avatar_url":"https://avatars.githubusercontent.com/u/635873?v=3","gravatar_id":"","url":"https://api.github.com/users/justingaylor","html_url":"https://github.com/justingaylor","followers_url":"https://api.github.com/users/justingaylor/followers","following_url":"https://api.github.com/users/justingaylor/following{/other_user}","gists_url":"https://api.github.com/users/justingaylor/gists{/gist_id}","starred_url":"https://api.github.com/users/justingaylor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justingaylor/subscriptions","organizations_url":"https://api.github.com/users/justingaylor/orgs","repos_url":"https://api.github.com/users/justingaylor/repos","events_url":"https://api.github.com/users/justingaylor/events{/privacy}","received_events_url":"https://api.github.com/users/justingaylor/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/rightscale/attributor/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/rightscale/attributor/milestones/2","html_url":"https://github.com/rightscale/attributor/milestones/v3.0","labels_url":"https://api.github.com/repos/rightscale/attributor/milestones/2/labels","id":790307,"number":2,"title":"v3.0","description":"Next major version.","creator":{"login":"careo","id":1156,"avatar_url":"https://avatars.githubusercontent.com/u/1156?v=3","gravatar_id":"","url":"https://api.github.com/users/careo","html_url":"https://github.com/careo","followers_url":"https://api.github.com/users/careo/followers","following_url":"https://api.github.com/users/careo/following{/other_user}","gists_url":"https://api.github.com/users/careo/gists{/gist_id}","starred_url":"https://api.github.com/users/careo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/careo/subscriptions","organizations_url":"https://api.github.com/users/careo/orgs","repos_url":"https://api.github.com/users/careo/repos","events_url":"https://api.github.com/users/careo/events{/privacy}","received_events_url":"https://api.github.com/users/careo/received_events","type":"User","site_admin":false},"open_issues":5,"closed_issues":7,"state":"open","created_at":"2014-09-15T17:04:19Z","updated_at":"2015-11-02T21:35:19Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2013-10-14T21:38:35Z","updated_at":"2015-11-02T21:35:19Z","closed_at":"2015-11-02T21:35:19Z","body":"Per discussion here: https://github.com/rightscale/attributor/pull/16/files#r6722390\r\n\r\nIt should be possible to make ```TrueClass``` and ```FalseClass``` both have a common ancestor and implement ```Attributor::Boolean.native_type```, provided that the following points are observed:\r\n- The parent class of ```TrueClass``` and ```FalseClass``` needs to be in the ```Attributor``` namespace somewhere.\r\n- We cannot mix anything into the classes other than logic to report that ```TrueClass``` and ```FalseClass``` are ```Attributor::Boolean``` objects.\r\n- Also confirm that ```===``` works.\r\n\r\n\r\nFor Inspiration:\r\nhttps://github.com/mongoid/mongoid/blob/master/lib/mongoid/extensions/boolean.rb\r\nhttps://github.com/mongoid/mongoid/blob/master/lib/mongoid/extensions/false_class.rb\r\nhttps://github.com/mongoid/mongoid/blob/master/lib/mongoid/extensions/true_class.rb"},"comment":{"url":"https://api.github.com/repos/rightscale/attributor/issues/comments/153164467","html_url":"https://github.com/rightscale/attributor/issues/31#issuecomment-153164467","issue_url":"https://api.github.com/repos/rightscale/attributor/issues/31","id":153164467,"user":{"login":"careo","id":1156,"avatar_url":"https://avatars.githubusercontent.com/u/1156?v=3","gravatar_id":"","url":"https://api.github.com/users/careo","html_url":"https://github.com/careo","followers_url":"https://api.github.com/users/careo/followers","following_url":"https://api.github.com/users/careo/following{/other_user}","gists_url":"https://api.github.com/users/careo/gists{/gist_id}","starred_url":"https://api.github.com/users/careo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/careo/subscriptions","organizations_url":"https://api.github.com/users/careo/orgs","repos_url":"https://api.github.com/users/careo/repos","events_url":"https://api.github.com/users/careo/events{/privacy}","received_events_url":"https://api.github.com/users/careo/received_events","type":"User","site_admin":false},"created_at":"2015-11-02T21:35:19Z","updated_at":"2015-11-02T21:35:19Z","body":"We added `valid_type?` for cases like this where we really mean to use the `something == type.native_type` value to determine if `something` is a a valid instance of the `type`."}}