{"action":"created","comment":{"url":"https://api.github.com/repos/opal/opal-browser/pulls/comments/40399693","id":40399693,"diff_hunk":"@@ -1,42 +1,57 @@\n-module Browser; module Audio; module Node;\n+module Browser; module Audio; module Node\n \n-module Pluggable\n-  def connect(other_node)\n-    `#@native.connect(#{Native.convert(other_node)})`\n+class Base\n+  include Native\n+\n+  def initialize(native)\n+    @native = native\n   end\n \n-  def disconnect(other_node, options = {})\n-    other_node = Native.try_convert(other_node)\n-    output     = options[:output] || 0\n-    input      = options[:input]  || 0\n+  def method_missing(name, value = nil)\n+    if name.end_with? '='\n+      `#@native[#{name.delete '='}].value = value`\n+    elsif value.nil? || value == true\n+      `#@native[#{name}].value`\n+    elsif value == false\n+      `#@native[#{name}]`\n+    else\n+      super\n+    end\n+  end\n+\n+  def respond_to_missing?(method, include_all = false)\n+    method_name = method.delete('=')\n+    `#@native[#{method_name}] !== undefined` || super","path":"opal/browser/audio/node.rb","position":32,"original_position":32,"commit_id":"52d26d8f417bd62c75f45314481ea9dc981ebd23","original_commit_id":"52d26d8f417bd62c75f45314481ea9dc981ebd23","user":{"login":"meh","id":40204,"avatar_url":"https://avatars.githubusercontent.com/u/40204?v=3","gravatar_id":"","url":"https://api.github.com/users/meh","html_url":"https://github.com/meh","followers_url":"https://api.github.com/users/meh/followers","following_url":"https://api.github.com/users/meh/following{/other_user}","gists_url":"https://api.github.com/users/meh/gists{/gist_id}","starred_url":"https://api.github.com/users/meh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/meh/subscriptions","organizations_url":"https://api.github.com/users/meh/orgs","repos_url":"https://api.github.com/users/meh/repos","events_url":"https://api.github.com/users/meh/events{/privacy}","received_events_url":"https://api.github.com/users/meh/received_events","type":"User","site_admin":false},"body":"You don't have to `super` in this case. Also no need to define `method_name`, just use it directly. Also it's probably a better idea to `!= null` instead of `!== undefined`.","created_at":"2015-09-25T05:01:15Z","updated_at":"2015-09-25T05:01:15Z","html_url":"https://github.com/opal/opal-browser/pull/45#discussion_r40399693","pull_request_url":"https://api.github.com/repos/opal/opal-browser/pulls/45","_links":{"self":{"href":"https://api.github.com/repos/opal/opal-browser/pulls/comments/40399693"},"html":{"href":"https://github.com/opal/opal-browser/pull/45#discussion_r40399693"},"pull_request":{"href":"https://api.github.com/repos/opal/opal-browser/pulls/45"}}},"pull_request":{"url":"https://api.github.com/repos/opal/opal-browser/pulls/45","id":45967529,"html_url":"https://github.com/opal/opal-browser/pull/45","diff_url":"https://github.com/opal/opal-browser/pull/45.diff","patch_url":"https://github.com/opal/opal-browser/pull/45.patch","issue_url":"https://api.github.com/repos/opal/opal-browser/issues/45","number":45,"state":"open","locked":false,"title":"audio: add ability to return values as AudioParams","user":{"login":"merongivian","id":4277403,"avatar_url":"https://avatars.githubusercontent.com/u/4277403?v=3","gravatar_id":"","url":"https://api.github.com/users/merongivian","html_url":"https://github.com/merongivian","followers_url":"https://api.github.com/users/merongivian/followers","following_url":"https://api.github.com/users/merongivian/following{/other_user}","gists_url":"https://api.github.com/users/merongivian/gists{/gist_id}","starred_url":"https://api.github.com/users/merongivian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/merongivian/subscriptions","organizations_url":"https://api.github.com/users/merongivian/orgs","repos_url":"https://api.github.com/users/merongivian/repos","events_url":"https://api.github.com/users/merongivian/events{/privacy}","received_events_url":"https://api.github.com/users/merongivian/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-09-25T01:00:42Z","updated_at":"2015-09-25T05:01:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"621bed9582a8b56cffbbfd2b7979ae25df13f1c9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/opal/opal-browser/pulls/45/commits","review_comments_url":"https://api.github.com/repos/opal/opal-browser/pulls/45/comments","review_comment_url":"https://api.github.com/repos/opal/opal-browser/pulls/comments{/number}","comments_url":"https://api.github.com/repos/opal/opal-browser/issues/45/comments","statuses_url":"https://api.github.com/repos/opal/opal-browser/statuses/52d26d8f417bd62c75f45314481ea9dc981ebd23","head":{"label":"merongivian:return-audio-params","ref":"return-audio-params","sha":"52d26d8f417bd62c75f45314481ea9dc981ebd23","user":{"login":"merongivian","id":4277403,"avatar_url":"https://avatars.githubusercontent.com/u/4277403?v=3","gravatar_id":"","url":"https://api.github.com/users/merongivian","html_url":"https://github.com/merongivian","followers_url":"https://api.github.com/users/merongivian/followers","following_url":"https://api.github.com/users/merongivian/following{/other_user}","gists_url":"https://api.github.com/users/merongivian/gists{/gist_id}","starred_url":"https://api.github.com/users/merongivian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/merongivian/subscriptions","organizations_url":"https://api.github.com/users/merongivian/orgs","repos_url":"https://api.github.com/users/merongivian/repos","events_url":"https://api.github.com/users/merongivian/events{/privacy}","received_events_url":"https://api.github.com/users/merongivian/received_events","type":"User","site_admin":false},"repo":{"id":42959358,"name":"opal-browser","full_name":"merongivian/opal-browser","owner":{"login":"merongivian","id":4277403,"avatar_url":"https://avatars.githubusercontent.com/u/4277403?v=3","gravatar_id":"","url":"https://api.github.com/users/merongivian","html_url":"https://github.com/merongivian","followers_url":"https://api.github.com/users/merongivian/followers","following_url":"https://api.github.com/users/merongivian/following{/other_user}","gists_url":"https://api.github.com/users/merongivian/gists{/gist_id}","starred_url":"https://api.github.com/users/merongivian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/merongivian/subscriptions","organizations_url":"https://api.github.com/users/merongivian/orgs","repos_url":"https://api.github.com/users/merongivian/repos","events_url":"https://api.github.com/users/merongivian/events{/privacy}","received_events_url":"https://api.github.com/users/merongivian/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/merongivian/opal-browser","description":"Browser support for Opal.","fork":true,"url":"https://api.github.com/repos/merongivian/opal-browser","forks_url":"https://api.github.com/repos/merongivian/opal-browser/forks","keys_url":"https://api.github.com/repos/merongivian/opal-browser/keys{/key_id}","collaborators_url":"https://api.github.com/repos/merongivian/opal-browser/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/merongivian/opal-browser/teams","hooks_url":"https://api.github.com/repos/merongivian/opal-browser/hooks","issue_events_url":"https://api.github.com/repos/merongivian/opal-browser/issues/events{/number}","events_url":"https://api.github.com/repos/merongivian/opal-browser/events","assignees_url":"https://api.github.com/repos/merongivian/opal-browser/assignees{/user}","branches_url":"https://api.github.com/repos/merongivian/opal-browser/branches{/branch}","tags_url":"https://api.github.com/repos/merongivian/opal-browser/tags","blobs_url":"https://api.github.com/repos/merongivian/opal-browser/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/merongivian/opal-browser/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/merongivian/opal-browser/git/refs{/sha}","trees_url":"https://api.github.com/repos/merongivian/opal-browser/git/trees{/sha}","statuses_url":"https://api.github.com/repos/merongivian/opal-browser/statuses/{sha}","languages_url":"https://api.github.com/repos/merongivian/opal-browser/languages","stargazers_url":"https://api.github.com/repos/merongivian/opal-browser/stargazers","contributors_url":"https://api.github.com/repos/merongivian/opal-browser/contributors","subscribers_url":"https://api.github.com/repos/merongivian/opal-browser/subscribers","subscription_url":"https://api.github.com/repos/merongivian/opal-browser/subscription","commits_url":"https://api.github.com/repos/merongivian/opal-browser/commits{/sha}","git_commits_url":"https://api.github.com/repos/merongivian/opal-browser/git/commits{/sha}","comments_url":"https://api.github.com/repos/merongivian/opal-browser/comments{/number}","issue_comment_url":"https://api.github.com/repos/merongivian/opal-browser/issues/comments{/number}","contents_url":"https://api.github.com/repos/merongivian/opal-browser/contents/{+path}","compare_url":"https://api.github.com/repos/merongivian/opal-browser/compare/{base}...{head}","merges_url":"https://api.github.com/repos/merongivian/opal-browser/merges","archive_url":"https://api.github.com/repos/merongivian/opal-browser/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/merongivian/opal-browser/downloads","issues_url":"https://api.github.com/repos/merongivian/opal-browser/issues{/number}","pulls_url":"https://api.github.com/repos/merongivian/opal-browser/pulls{/number}","milestones_url":"https://api.github.com/repos/merongivian/opal-browser/milestones{/number}","notifications_url":"https://api.github.com/repos/merongivian/opal-browser/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/merongivian/opal-browser/labels{/name}","releases_url":"https://api.github.com/repos/merongivian/opal-browser/releases{/id}","created_at":"2015-09-22T20:34:34Z","updated_at":"2015-09-22T20:34:35Z","pushed_at":"2015-09-25T04:53:23Z","git_url":"git://github.com/merongivian/opal-browser.git","ssh_url":"git@github.com:merongivian/opal-browser.git","clone_url":"https://github.com/merongivian/opal-browser.git","svn_url":"https://github.com/merongivian/opal-browser","homepage":null,"size":2155,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"opal:master","ref":"master","sha":"263ae9c71bce83a915b0c71f5310c29113c41fd5","user":{"login":"opal","id":842643,"avatar_url":"https://avatars.githubusercontent.com/u/842643?v=3","gravatar_id":"","url":"https://api.github.com/users/opal","html_url":"https://github.com/opal","followers_url":"https://api.github.com/users/opal/followers","following_url":"https://api.github.com/users/opal/following{/other_user}","gists_url":"https://api.github.com/users/opal/gists{/gist_id}","starred_url":"https://api.github.com/users/opal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opal/subscriptions","organizations_url":"https://api.github.com/users/opal/orgs","repos_url":"https://api.github.com/users/opal/repos","events_url":"https://api.github.com/users/opal/events{/privacy}","received_events_url":"https://api.github.com/users/opal/received_events","type":"Organization","site_admin":false},"repo":{"id":10583853,"name":"opal-browser","full_name":"opal/opal-browser","owner":{"login":"opal","id":842643,"avatar_url":"https://avatars.githubusercontent.com/u/842643?v=3","gravatar_id":"","url":"https://api.github.com/users/opal","html_url":"https://github.com/opal","followers_url":"https://api.github.com/users/opal/followers","following_url":"https://api.github.com/users/opal/following{/other_user}","gists_url":"https://api.github.com/users/opal/gists{/gist_id}","starred_url":"https://api.github.com/users/opal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opal/subscriptions","organizations_url":"https://api.github.com/users/opal/orgs","repos_url":"https://api.github.com/users/opal/repos","events_url":"https://api.github.com/users/opal/events{/privacy}","received_events_url":"https://api.github.com/users/opal/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/opal/opal-browser","description":"Browser support for Opal.","fork":false,"url":"https://api.github.com/repos/opal/opal-browser","forks_url":"https://api.github.com/repos/opal/opal-browser/forks","keys_url":"https://api.github.com/repos/opal/opal-browser/keys{/key_id}","collaborators_url":"https://api.github.com/repos/opal/opal-browser/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/opal/opal-browser/teams","hooks_url":"https://api.github.com/repos/opal/opal-browser/hooks","issue_events_url":"https://api.github.com/repos/opal/opal-browser/issues/events{/number}","events_url":"https://api.github.com/repos/opal/opal-browser/events","assignees_url":"https://api.github.com/repos/opal/opal-browser/assignees{/user}","branches_url":"https://api.github.com/repos/opal/opal-browser/branches{/branch}","tags_url":"https://api.github.com/repos/opal/opal-browser/tags","blobs_url":"https://api.github.com/repos/opal/opal-browser/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/opal/opal-browser/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/opal/opal-browser/git/refs{/sha}","trees_url":"https://api.github.com/repos/opal/opal-browser/git/trees{/sha}","statuses_url":"https://api.github.com/repos/opal/opal-browser/statuses/{sha}","languages_url":"https://api.github.com/repos/opal/opal-browser/languages","stargazers_url":"https://api.github.com/repos/opal/opal-browser/stargazers","contributors_url":"https://api.github.com/repos/opal/opal-browser/contributors","subscribers_url":"https://api.github.com/repos/opal/opal-browser/subscribers","subscription_url":"https://api.github.com/repos/opal/opal-browser/subscription","commits_url":"https://api.github.com/repos/opal/opal-browser/commits{/sha}","git_commits_url":"https://api.github.com/repos/opal/opal-browser/git/commits{/sha}","comments_url":"https://api.github.com/repos/opal/opal-browser/comments{/number}","issue_comment_url":"https://api.github.com/repos/opal/opal-browser/issues/comments{/number}","contents_url":"https://api.github.com/repos/opal/opal-browser/contents/{+path}","compare_url":"https://api.github.com/repos/opal/opal-browser/compare/{base}...{head}","merges_url":"https://api.github.com/repos/opal/opal-browser/merges","archive_url":"https://api.github.com/repos/opal/opal-browser/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/opal/opal-browser/downloads","issues_url":"https://api.github.com/repos/opal/opal-browser/issues{/number}","pulls_url":"https://api.github.com/repos/opal/opal-browser/pulls{/number}","milestones_url":"https://api.github.com/repos/opal/opal-browser/milestones{/number}","notifications_url":"https://api.github.com/repos/opal/opal-browser/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/opal/opal-browser/labels{/name}","releases_url":"https://api.github.com/repos/opal/opal-browser/releases{/id}","created_at":"2013-06-09T13:57:02Z","updated_at":"2015-09-14T12:58:00Z","pushed_at":"2015-09-25T04:53:23Z","git_url":"git://github.com/opal/opal-browser.git","ssh_url":"git@github.com:opal/opal-browser.git","clone_url":"https://github.com/opal/opal-browser.git","svn_url":"https://github.com/opal/opal-browser","homepage":null,"size":2155,"stargazers_count":58,"watchers_count":58,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":19,"mirror_url":null,"open_issues_count":10,"forks":19,"open_issues":10,"watchers":58,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/opal/opal-browser/pulls/45"},"html":{"href":"https://github.com/opal/opal-browser/pull/45"},"issue":{"href":"https://api.github.com/repos/opal/opal-browser/issues/45"},"comments":{"href":"https://api.github.com/repos/opal/opal-browser/issues/45/comments"},"review_comments":{"href":"https://api.github.com/repos/opal/opal-browser/pulls/45/comments"},"review_comment":{"href":"https://api.github.com/repos/opal/opal-browser/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/opal/opal-browser/pulls/45/commits"},"statuses":{"href":"https://api.github.com/repos/opal/opal-browser/statuses/52d26d8f417bd62c75f45314481ea9dc981ebd23"}}}}