{"action":"created","issue":{"url":"https://api.github.com/repos/hanami/view/issues/102","repository_url":"https://api.github.com/repos/hanami/view","labels_url":"https://api.github.com/repos/hanami/view/issues/102/labels{/name}","comments_url":"https://api.github.com/repos/hanami/view/issues/102/comments","events_url":"https://api.github.com/repos/hanami/view/issues/102/events","html_url":"https://github.com/hanami/view/issues/102","id":159722631,"number":102,"title":"Hanami::Presenter turns private methods into public ones","user":{"login":"mereghost","id":10281,"avatar_url":"https://avatars.githubusercontent.com/u/10281?v=3","gravatar_id":"","url":"https://api.github.com/users/mereghost","html_url":"https://github.com/mereghost","followers_url":"https://api.github.com/users/mereghost/followers","following_url":"https://api.github.com/users/mereghost/following{/other_user}","gists_url":"https://api.github.com/users/mereghost/gists{/gist_id}","starred_url":"https://api.github.com/users/mereghost/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mereghost/subscriptions","organizations_url":"https://api.github.com/users/mereghost/orgs","repos_url":"https://api.github.com/users/mereghost/repos","events_url":"https://api.github.com/users/mereghost/events{/privacy}","received_events_url":"https://api.github.com/users/mereghost/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"jodosha","id":5089,"avatar_url":"https://avatars.githubusercontent.com/u/5089?v=3","gravatar_id":"","url":"https://api.github.com/users/jodosha","html_url":"https://github.com/jodosha","followers_url":"https://api.github.com/users/jodosha/followers","following_url":"https://api.github.com/users/jodosha/following{/other_user}","gists_url":"https://api.github.com/users/jodosha/gists{/gist_id}","starred_url":"https://api.github.com/users/jodosha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jodosha/subscriptions","organizations_url":"https://api.github.com/users/jodosha/orgs","repos_url":"https://api.github.com/users/jodosha/repos","events_url":"https://api.github.com/users/jodosha/events{/privacy}","received_events_url":"https://api.github.com/users/jodosha/received_events","type":"User","site_admin":false},"milestone":null,"comments":5,"created_at":"2016-06-10T21:00:17Z","updated_at":"2016-06-15T13:37:56Z","closed_at":null,"body":"Consider the following example:\r\n\r\n```ruby\r\nclass AwesomePresenter\r\n  include Hanami::Presenter\r\n\r\n  private\r\n\r\n  def a_method\r\n    puts \"You should not pry in the private lives of others\"\r\n  end\r\nend\r\n\r\ncontrived_example = AwesomePresenter.new(Object.new)\r\ncontrived_example.public_methods.include? :a_method      #=> true\r\ncontrived_example.a_method    #=> \"You should not pry in the private lives of others\"\r\n```\r\n\r\nWhat I expected is that it would return false and not being able to be called with a receiver other than `self` as `SimpleDelegator` does.\r\n\r\nAlso, is there a reason that it does not use `SimpleDelegator` or tries to implement `Delegator` at all?"},"comment":{"url":"https://api.github.com/repos/hanami/view/issues/comments/226189316","html_url":"https://github.com/hanami/view/issues/102#issuecomment-226189316","issue_url":"https://api.github.com/repos/hanami/view/issues/102","id":226189316,"user":{"login":"mereghost","id":10281,"avatar_url":"https://avatars.githubusercontent.com/u/10281?v=3","gravatar_id":"","url":"https://api.github.com/users/mereghost","html_url":"https://github.com/mereghost","followers_url":"https://api.github.com/users/mereghost/followers","following_url":"https://api.github.com/users/mereghost/following{/other_user}","gists_url":"https://api.github.com/users/mereghost/gists{/gist_id}","starred_url":"https://api.github.com/users/mereghost/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mereghost/subscriptions","organizations_url":"https://api.github.com/users/mereghost/orgs","repos_url":"https://api.github.com/users/mereghost/repos","events_url":"https://api.github.com/users/mereghost/events{/privacy}","received_events_url":"https://api.github.com/users/mereghost/received_events","type":"User","site_admin":false},"created_at":"2016-06-15T13:37:56Z","updated_at":"2016-06-15T13:37:56Z","body":"After some digging around I found out that I was just being dumb. I was calling `public_methods` and not `public_instance_methods` as a guard clause on the `method_added` method and that breaks everything."}}
{"actor":{"display_login":"mereghost"}}