{"action":"created","issue":{"url":"https://api.github.com/repos/mobify/plugin/issues/6","labels_url":"https://api.github.com/repos/mobify/plugin/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/mobify/plugin/issues/6/comments","events_url":"https://api.github.com/repos/mobify/plugin/issues/6/events","html_url":"https://github.com/mobify/plugin/pull/6","id":53345411,"number":6,"title":"Fixing method return values","user":{"login":"scalvert","id":180990,"avatar_url":"https://avatars.githubusercontent.com/u/180990?v=3","gravatar_id":"","url":"https://api.github.com/users/scalvert","html_url":"https://github.com/scalvert","followers_url":"https://api.github.com/users/scalvert/followers","following_url":"https://api.github.com/users/scalvert/following{/other_user}","gists_url":"https://api.github.com/users/scalvert/gists{/gist_id}","starred_url":"https://api.github.com/users/scalvert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scalvert/subscriptions","organizations_url":"https://api.github.com/users/scalvert/orgs","repos_url":"https://api.github.com/users/scalvert/repos","events_url":"https://api.github.com/users/scalvert/events{/privacy}","received_events_url":"https://api.github.com/users/scalvert/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-01-04T19:19:01Z","updated_at":"2015-01-12T17:36:15Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/mobify/plugin/pulls/6","html_url":"https://github.com/mobify/plugin/pull/6","diff_url":"https://github.com/mobify/plugin/pull/6.diff","patch_url":"https://github.com/mobify/plugin/pull/6.patch"},"body":"Fixing issue where methods invoked on plugin interface don't return the correct value when returning a non-selector based object.\r\n\r\nStatus: **Ready to merge**\r\n\r\nReviewers: @tedtate\r\n\r\n## Changes\r\n- split up the `each` loop inside the plugin to each return the correct return value depending on whether we're initializing the plugin or returning a method value.\r\n\r\n## How to test-drive this PR\r\n- checkout this branch\r\n- `grunt test`\r\n- create a plugin that calls a method, and returns a `string`, `number`, `object`, etc.\r\n- ensure that when method is called it returns the correct value\r\n"},"comment":{"url":"https://api.github.com/repos/mobify/plugin/issues/comments/69610025","html_url":"https://github.com/mobify/plugin/pull/6#issuecomment-69610025","issue_url":"https://api.github.com/repos/mobify/plugin/issues/6","id":69610025,"user":{"login":"Helen-Mobify","id":2319002,"avatar_url":"https://avatars.githubusercontent.com/u/2319002?v=3","gravatar_id":"","url":"https://api.github.com/users/Helen-Mobify","html_url":"https://github.com/Helen-Mobify","followers_url":"https://api.github.com/users/Helen-Mobify/followers","following_url":"https://api.github.com/users/Helen-Mobify/following{/other_user}","gists_url":"https://api.github.com/users/Helen-Mobify/gists{/gist_id}","starred_url":"https://api.github.com/users/Helen-Mobify/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Helen-Mobify/subscriptions","organizations_url":"https://api.github.com/users/Helen-Mobify/orgs","repos_url":"https://api.github.com/users/Helen-Mobify/repos","events_url":"https://api.github.com/users/Helen-Mobify/events{/privacy}","received_events_url":"https://api.github.com/users/Helen-Mobify/received_events","type":"User","site_admin":false},"created_at":"2015-01-12T17:36:15Z","updated_at":"2015-01-12T17:36:15Z","body":":+1: Confirmed the plugin is working in the following manner:\r\nWhen there is 1 instance of the plugin, the plugin will return the value of the method.\r\nWhen there are multiple instance of the plugins, the plugin will return the dom elements that the plugins are bind to."}}