{"action":"created","issue":{"url":"https://api.github.com/repos/costan/smartcard/issues/1","labels_url":"https://api.github.com/repos/costan/smartcard/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/costan/smartcard/issues/1/comments","events_url":"https://api.github.com/repos/costan/smartcard/issues/1/events","html_url":"https://github.com/costan/smartcard/pull/1","id":17318416,"number":1,"title":"Extend ReaderStateQueries with Enumerable mixin.","user":{"login":"covin","id":143102,"avatar_url":"https://avatars.githubusercontent.com/u/143102?v=3","gravatar_id":"","url":"https://api.github.com/users/covin","html_url":"https://github.com/covin","followers_url":"https://api.github.com/users/covin/followers","following_url":"https://api.github.com/users/covin/following{/other_user}","gists_url":"https://api.github.com/users/covin/gists{/gist_id}","starred_url":"https://api.github.com/users/covin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/covin/subscriptions","organizations_url":"https://api.github.com/users/covin/orgs","repos_url":"https://api.github.com/users/covin/repos","events_url":"https://api.github.com/users/covin/events{/privacy}","received_events_url":"https://api.github.com/users/covin/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2013-07-28T22:44:34Z","updated_at":"2015-07-14T05:03:09Z","closed_at":"2015-07-14T05:03:03Z","pull_request":{"url":"https://api.github.com/repos/costan/smartcard/pulls/1","html_url":"https://github.com/costan/smartcard/pull/1","diff_url":"https://github.com/costan/smartcard/pull/1.diff","patch_url":"https://github.com/costan/smartcard/pull/1.patch"},"body":"I felt a little bit uncomfortable in ReaderStateQuerie(s) handling. With Enumerable accessing ReaderStateQueries becomes more intuitive, e.g.:\r\n\r\n```ruby\r\nqueries = Smartcard::PCSC::ReaderStateQueries.new(readers.size)\r\nqueries.each_with_index do |q, i|\r\n  q.reader_name = readers[i]\r\n  q.current_state = :empty\r\nend\r\n# ...\r\nqueries.select { |q| q.event_state.include? :present }.each do |query|\r\n  # do stuff on readers with present cards\r\nend\r\n```\r\n\r\nI've also increased version number.\r\n\r\ncheers\r\n--alex"},"comment":{"url":"https://api.github.com/repos/costan/smartcard/issues/comments/121133585","html_url":"https://github.com/costan/smartcard/pull/1#issuecomment-121133585","issue_url":"https://api.github.com/repos/costan/smartcard/issues/1","id":121133585,"user":{"login":"pwnall","id":11460,"avatar_url":"https://avatars.githubusercontent.com/u/11460?v=3","gravatar_id":"","url":"https://api.github.com/users/pwnall","html_url":"https://github.com/pwnall","followers_url":"https://api.github.com/users/pwnall/followers","following_url":"https://api.github.com/users/pwnall/following{/other_user}","gists_url":"https://api.github.com/users/pwnall/gists{/gist_id}","starred_url":"https://api.github.com/users/pwnall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pwnall/subscriptions","organizations_url":"https://api.github.com/users/pwnall/orgs","repos_url":"https://api.github.com/users/pwnall/repos","events_url":"https://api.github.com/users/pwnall/events{/privacy}","received_events_url":"https://api.github.com/users/pwnall/received_events","type":"User","site_admin":false},"created_at":"2015-07-14T05:03:09Z","updated_at":"2015-07-14T05:03:09Z","body":"Thank you!"}}