{"action":"created","issue":{"url":"https://api.github.com/repos/prawnpdf/prawn/issues/971","repository_url":"https://api.github.com/repos/prawnpdf/prawn","labels_url":"https://api.github.com/repos/prawnpdf/prawn/issues/971/labels{/name}","comments_url":"https://api.github.com/repos/prawnpdf/prawn/issues/971/comments","events_url":"https://api.github.com/repos/prawnpdf/prawn/issues/971/events","html_url":"https://github.com/prawnpdf/prawn/pull/971","id":167251037,"number":971,"title":"implement respond_to_missing? method for Prawn::View module","user":{"login":"Rodrigora","id":371053,"avatar_url":"https://avatars.githubusercontent.com/u/371053?v=3","gravatar_id":"","url":"https://api.github.com/users/Rodrigora","html_url":"https://github.com/Rodrigora","followers_url":"https://api.github.com/users/Rodrigora/followers","following_url":"https://api.github.com/users/Rodrigora/following{/other_user}","gists_url":"https://api.github.com/users/Rodrigora/gists{/gist_id}","starred_url":"https://api.github.com/users/Rodrigora/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rodrigora/subscriptions","organizations_url":"https://api.github.com/users/Rodrigora/orgs","repos_url":"https://api.github.com/users/Rodrigora/repos","events_url":"https://api.github.com/users/Rodrigora/events{/privacy}","received_events_url":"https://api.github.com/users/Rodrigora/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-07-24T19:57:49Z","updated_at":"2016-07-30T18:12:37Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/prawnpdf/prawn/pulls/971","html_url":"https://github.com/prawnpdf/prawn/pull/971","diff_url":"https://github.com/prawnpdf/prawn/pull/971.diff","patch_url":"https://github.com/prawnpdf/prawn/pull/971.patch"},"body":"Hey guys.\r\n\r\nfirst thank you for this awesome gem.\r\n\r\nI'm building a library on top of prawn that forwards all `Prawn::Document` methods to `@document` taking advantage of `Prawn::View` module.\r\n\r\nMy code look like this:\r\n\r\n```ruby\r\n\r\nclass PdfReport\r\n  include Prawn::View\r\n  # ....\r\nend\r\n\r\nreport = PdfReport.new\r\n\r\n# here is the problem\r\nreport.respond_to?(:text)  # => returns false\r\nreport.text('Hi there')    # => works\r\n```\r\n\r\nThe `report` should return `true` since it forwards the `text` method to `@document`. More info: [https://robots.thoughtbot.com/always-define-respond-to-missing-when-overriding](https://robots.thoughtbot.com/always-define-respond-to-missing-when-overriding)\r\n\r\nIn this PR I implemented the `respond_to_missing` method for `Prawn::View` module.\r\n\r\nPlease review and LMK if you agree with this change.\r\nAnd, however this is a simple change, it may break some codes. I think this should be included in a major version.\r\n\r\nThank you for reviewing it."},"comment":{"url":"https://api.github.com/repos/prawnpdf/prawn/issues/comments/236380562","html_url":"https://github.com/prawnpdf/prawn/pull/971#issuecomment-236380562","issue_url":"https://api.github.com/repos/prawnpdf/prawn/issues/971","id":236380562,"user":{"login":"packetmonkey","id":4451,"avatar_url":"https://avatars.githubusercontent.com/u/4451?v=3","gravatar_id":"","url":"https://api.github.com/users/packetmonkey","html_url":"https://github.com/packetmonkey","followers_url":"https://api.github.com/users/packetmonkey/followers","following_url":"https://api.github.com/users/packetmonkey/following{/other_user}","gists_url":"https://api.github.com/users/packetmonkey/gists{/gist_id}","starred_url":"https://api.github.com/users/packetmonkey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/packetmonkey/subscriptions","organizations_url":"https://api.github.com/users/packetmonkey/orgs","repos_url":"https://api.github.com/users/packetmonkey/repos","events_url":"https://api.github.com/users/packetmonkey/events{/privacy}","received_events_url":"https://api.github.com/users/packetmonkey/received_events","type":"User","site_admin":false},"created_at":"2016-07-30T18:12:37Z","updated_at":"2016-07-30T18:12:37Z","body":"This looks good to me.\r\n\r\n@pointlessone Any reason to not merge you can think of?"}}
{"actor":{"display_login":"packetmonkey"}}