{"action":"created","comment":{"url":"https://api.github.com/repos/Demian-Moschin/startup/pulls/comments/40047036","id":40047036,"diff_hunk":"@@ -0,0 +1,94 @@\n+var MovieObserver = function ( ) {};\n+MovieObserver.prototype.playing = function ( title ) {\n+    console.log('A movie with title ' + title + ' has been played');\n+};\n+MovieObserver.prototype.stopped = function( title ) {\n+    console.log('A movie with title ' + title + ' stopped');\n+};\n+\n+var Movie = function ( paramName, paramValue ) {\n+  //Variables\n+  this.attributes = [];\n+  this.attributes[paramName] = paramValue; \n+  this.observer = new MovieObserver();\n+};//end movie constructor\n+\n+Movie.prototype = {\n+  \n+  get: function (atribute) {\n+     return this.attributes[atribute];\n+  }, \n+\n+  set:function (atribute, value) {\n+    this.attributes[atribute] = value;\n+      \n+  },\n+\n+  play:function () {\n+    console.log('This is Movie.play method: I am a movie. This is my title: ' + this.attributes['title']);\n+    this.observer.playing(this.attributes['title']);\n+  },\n+\n+  stop:function () {\n+    this.observer.stopped(this.attributes['title']);\n+  }\n+\n+};\n+\n+var DownloableMovie  = function ( paramName, paramValue ) {\n+  Movie.call(this, paramName,paramValue);\n+};\n+\n+var inheritPrototype = function (paramParentObject, paramChildObject ) {\n+  var copyOfParent =Object.create(paramParentObject.prototype);\n+  copyOfParent.constructor = paramChildObject;\n+  paramChildObject.prototype = copyOfParent;\n+};\n+\n+\n+\n+inheritPrototype(Movie,DownloableMovie);\n+\n+/**\n+*Augment existing 'class' with a method from another.\n+*This function is courtesy of Addy Osmani\n+* From the book JavaScript Design Patterns\n+*/\n+var augment= function ( receivingClass, givingClass ) {\n+  // only provide certain methods\n+  if ( arguments[2] ) {\n+    for (var i=2, len=arguments.length; i<len; i++) {\n+      receivingClass.prototype[arguments[i]] = givingClass.prototype[arguments[i]];\n+    }\n+  }\n+  // provide all methods\n+  else {\n+    for ( var methodName in givingClass.prototype ) {\n+      /* check to make sure the receiving class doesn't\n+      have a method of the same name as the one currently\n+      being processed */\n+      if ( !receivingClass.prototype[methodName] ) {\n+        receivingClass.prototype[methodName] = givingClass.prototype[methodName];\n+      }\n+    }\n+  }\n+};\n+\n+//Mixin Object() \n+var Social = function(){};\n+Social.prototype = {\n+    share: function (friendName){","path":"02-oop-inheritance/javaScript/refactored_JS/downloableMovie v0.1.js","position":80,"original_position":80,"commit_id":"44e3b9b7124445aa5bb042df6b7fa91680831c20","original_commit_id":"44e3b9b7124445aa5bb042df6b7fa91680831c20","user":{"login":"troianoandres","id":8448246,"avatar_url":"https://avatars.githubusercontent.com/u/8448246?v=3","gravatar_id":"","url":"https://api.github.com/users/troianoandres","html_url":"https://github.com/troianoandres","followers_url":"https://api.github.com/users/troianoandres/followers","following_url":"https://api.github.com/users/troianoandres/following{/other_user}","gists_url":"https://api.github.com/users/troianoandres/gists{/gist_id}","starred_url":"https://api.github.com/users/troianoandres/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/troianoandres/subscriptions","organizations_url":"https://api.github.com/users/troianoandres/orgs","repos_url":"https://api.github.com/users/troianoandres/repos","events_url":"https://api.github.com/users/troianoandres/events{/privacy}","received_events_url":"https://api.github.com/users/troianoandres/received_events","type":"User","site_admin":false},"body":"Same here with the constructor (as I said my bad)","created_at":"2015-09-22T01:42:31Z","updated_at":"2015-09-22T01:42:31Z","html_url":"https://github.com/Demian-Moschin/startup/pull/3#discussion_r40047036","pull_request_url":"https://api.github.com/repos/Demian-Moschin/startup/pulls/3","_links":{"self":{"href":"https://api.github.com/repos/Demian-Moschin/startup/pulls/comments/40047036"},"html":{"href":"https://github.com/Demian-Moschin/startup/pull/3#discussion_r40047036"},"pull_request":{"href":"https://api.github.com/repos/Demian-Moschin/startup/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/Demian-Moschin/startup/pulls/3","id":45157291,"html_url":"https://github.com/Demian-Moschin/startup/pull/3","diff_url":"https://github.com/Demian-Moschin/startup/pull/3.diff","patch_url":"https://github.com/Demian-Moschin/startup/pull/3.patch","issue_url":"https://api.github.com/repos/Demian-Moschin/startup/issues/3","number":3,"state":"open","locked":false,"title":"[Demian Moschin]- topic 2 - Initial commit","user":{"login":"Demian-Moschin","id":6402577,"avatar_url":"https://avatars.githubusercontent.com/u/6402577?v=3","gravatar_id":"","url":"https://api.github.com/users/Demian-Moschin","html_url":"https://github.com/Demian-Moschin","followers_url":"https://api.github.com/users/Demian-Moschin/followers","following_url":"https://api.github.com/users/Demian-Moschin/following{/other_user}","gists_url":"https://api.github.com/users/Demian-Moschin/gists{/gist_id}","starred_url":"https://api.github.com/users/Demian-Moschin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Demian-Moschin/subscriptions","organizations_url":"https://api.github.com/users/Demian-Moschin/orgs","repos_url":"https://api.github.com/users/Demian-Moschin/repos","events_url":"https://api.github.com/users/Demian-Moschin/events{/privacy}","received_events_url":"https://api.github.com/users/Demian-Moschin/received_events","type":"User","site_admin":false},"body":"@troianoandres \r\n@Tergopol\r\n\r\n* Initial commit\r\n* Comments:\r\n * Still not able to merge, work in progress.","created_at":"2015-09-16T10:57:32Z","updated_at":"2015-09-22T01:42:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"09dfd472239089f074b3c802b5b55e4c72927023","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Demian-Moschin/startup/pulls/3/commits","review_comments_url":"https://api.github.com/repos/Demian-Moschin/startup/pulls/3/comments","review_comment_url":"https://api.github.com/repos/Demian-Moschin/startup/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Demian-Moschin/startup/issues/3/comments","statuses_url":"https://api.github.com/repos/Demian-Moschin/startup/statuses/44e3b9b7124445aa5bb042df6b7fa91680831c20","head":{"label":"Demian-Moschin:02-design-patterns-and-OOP-in-JavaScript","ref":"02-design-patterns-and-OOP-in-JavaScript","sha":"44e3b9b7124445aa5bb042df6b7fa91680831c20","user":{"login":"Demian-Moschin","id":6402577,"avatar_url":"https://avatars.githubusercontent.com/u/6402577?v=3","gravatar_id":"","url":"https://api.github.com/users/Demian-Moschin","html_url":"https://github.com/Demian-Moschin","followers_url":"https://api.github.com/users/Demian-Moschin/followers","following_url":"https://api.github.com/users/Demian-Moschin/following{/other_user}","gists_url":"https://api.github.com/users/Demian-Moschin/gists{/gist_id}","starred_url":"https://api.github.com/users/Demian-Moschin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Demian-Moschin/subscriptions","organizations_url":"https://api.github.com/users/Demian-Moschin/orgs","repos_url":"https://api.github.com/users/Demian-Moschin/repos","events_url":"https://api.github.com/users/Demian-Moschin/events{/privacy}","received_events_url":"https://api.github.com/users/Demian-Moschin/received_events","type":"User","site_admin":false},"repo":{"id":42088876,"name":"startup","full_name":"Demian-Moschin/startup","owner":{"login":"Demian-Moschin","id":6402577,"avatar_url":"https://avatars.githubusercontent.com/u/6402577?v=3","gravatar_id":"","url":"https://api.github.com/users/Demian-Moschin","html_url":"https://github.com/Demian-Moschin","followers_url":"https://api.github.com/users/Demian-Moschin/followers","following_url":"https://api.github.com/users/Demian-Moschin/following{/other_user}","gists_url":"https://api.github.com/users/Demian-Moschin/gists{/gist_id}","starred_url":"https://api.github.com/users/Demian-Moschin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Demian-Moschin/subscriptions","organizations_url":"https://api.github.com/users/Demian-Moschin/orgs","repos_url":"https://api.github.com/users/Demian-Moschin/repos","events_url":"https://api.github.com/users/Demian-Moschin/events{/privacy}","received_events_url":"https://api.github.com/users/Demian-Moschin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Demian-Moschin/startup","description":"Basic folder structure","fork":true,"url":"https://api.github.com/repos/Demian-Moschin/startup","forks_url":"https://api.github.com/repos/Demian-Moschin/startup/forks","keys_url":"https://api.github.com/repos/Demian-Moschin/startup/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Demian-Moschin/startup/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Demian-Moschin/startup/teams","hooks_url":"https://api.github.com/repos/Demian-Moschin/startup/hooks","issue_events_url":"https://api.github.com/repos/Demian-Moschin/startup/issues/events{/number}","events_url":"https://api.github.com/repos/Demian-Moschin/startup/events","assignees_url":"https://api.github.com/repos/Demian-Moschin/startup/assignees{/user}","branches_url":"https://api.github.com/repos/Demian-Moschin/startup/branches{/branch}","tags_url":"https://api.github.com/repos/Demian-Moschin/startup/tags","blobs_url":"https://api.github.com/repos/Demian-Moschin/startup/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Demian-Moschin/startup/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Demian-Moschin/startup/git/refs{/sha}","trees_url":"https://api.github.com/repos/Demian-Moschin/startup/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Demian-Moschin/startup/statuses/{sha}","languages_url":"https://api.github.com/repos/Demian-Moschin/startup/languages","stargazers_url":"https://api.github.com/repos/Demian-Moschin/startup/stargazers","contributors_url":"https://api.github.com/repos/Demian-Moschin/startup/contributors","subscribers_url":"https://api.github.com/repos/Demian-Moschin/startup/subscribers","subscription_url":"https://api.github.com/repos/Demian-Moschin/startup/subscription","commits_url":"https://api.github.com/repos/Demian-Moschin/startup/commits{/sha}","git_commits_url":"https://api.github.com/repos/Demian-Moschin/startup/git/commits{/sha}","comments_url":"https://api.github.com/repos/Demian-Moschin/startup/comments{/number}","issue_comment_url":"https://api.github.com/repos/Demian-Moschin/startup/issues/comments{/number}","contents_url":"https://api.github.com/repos/Demian-Moschin/startup/contents/{+path}","compare_url":"https://api.github.com/repos/Demian-Moschin/startup/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Demian-Moschin/startup/merges","archive_url":"https://api.github.com/repos/Demian-Moschin/startup/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Demian-Moschin/startup/downloads","issues_url":"https://api.github.com/repos/Demian-Moschin/startup/issues{/number}","pulls_url":"https://api.github.com/repos/Demian-Moschin/startup/pulls{/number}","milestones_url":"https://api.github.com/repos/Demian-Moschin/startup/milestones{/number}","notifications_url":"https://api.github.com/repos/Demian-Moschin/startup/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Demian-Moschin/startup/labels{/name}","releases_url":"https://api.github.com/repos/Demian-Moschin/startup/releases{/id}","created_at":"2015-09-08T03:52:37Z","updated_at":"2015-09-08T04:04:03Z","pushed_at":"2015-09-21T16:14:01Z","git_url":"git://github.com/Demian-Moschin/startup.git","ssh_url":"git@github.com:Demian-Moschin/startup.git","clone_url":"https://github.com/Demian-Moschin/startup.git","svn_url":"https://github.com/Demian-Moschin/startup","homepage":null,"size":16326,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"base":{"label":"Demian-Moschin:master","ref":"master","sha":"1b3fb73ebf83099e7057641c87203fc325535871","user":{"login":"Demian-Moschin","id":6402577,"avatar_url":"https://avatars.githubusercontent.com/u/6402577?v=3","gravatar_id":"","url":"https://api.github.com/users/Demian-Moschin","html_url":"https://github.com/Demian-Moschin","followers_url":"https://api.github.com/users/Demian-Moschin/followers","following_url":"https://api.github.com/users/Demian-Moschin/following{/other_user}","gists_url":"https://api.github.com/users/Demian-Moschin/gists{/gist_id}","starred_url":"https://api.github.com/users/Demian-Moschin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Demian-Moschin/subscriptions","organizations_url":"https://api.github.com/users/Demian-Moschin/orgs","repos_url":"https://api.github.com/users/Demian-Moschin/repos","events_url":"https://api.github.com/users/Demian-Moschin/events{/privacy}","received_events_url":"https://api.github.com/users/Demian-Moschin/received_events","type":"User","site_admin":false},"repo":{"id":42088876,"name":"startup","full_name":"Demian-Moschin/startup","owner":{"login":"Demian-Moschin","id":6402577,"avatar_url":"https://avatars.githubusercontent.com/u/6402577?v=3","gravatar_id":"","url":"https://api.github.com/users/Demian-Moschin","html_url":"https://github.com/Demian-Moschin","followers_url":"https://api.github.com/users/Demian-Moschin/followers","following_url":"https://api.github.com/users/Demian-Moschin/following{/other_user}","gists_url":"https://api.github.com/users/Demian-Moschin/gists{/gist_id}","starred_url":"https://api.github.com/users/Demian-Moschin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Demian-Moschin/subscriptions","organizations_url":"https://api.github.com/users/Demian-Moschin/orgs","repos_url":"https://api.github.com/users/Demian-Moschin/repos","events_url":"https://api.github.com/users/Demian-Moschin/events{/privacy}","received_events_url":"https://api.github.com/users/Demian-Moschin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Demian-Moschin/startup","description":"Basic folder structure","fork":true,"url":"https://api.github.com/repos/Demian-Moschin/startup","forks_url":"https://api.github.com/repos/Demian-Moschin/startup/forks","keys_url":"https://api.github.com/repos/Demian-Moschin/startup/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Demian-Moschin/startup/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Demian-Moschin/startup/teams","hooks_url":"https://api.github.com/repos/Demian-Moschin/startup/hooks","issue_events_url":"https://api.github.com/repos/Demian-Moschin/startup/issues/events{/number}","events_url":"https://api.github.com/repos/Demian-Moschin/startup/events","assignees_url":"https://api.github.com/repos/Demian-Moschin/startup/assignees{/user}","branches_url":"https://api.github.com/repos/Demian-Moschin/startup/branches{/branch}","tags_url":"https://api.github.com/repos/Demian-Moschin/startup/tags","blobs_url":"https://api.github.com/repos/Demian-Moschin/startup/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Demian-Moschin/startup/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Demian-Moschin/startup/git/refs{/sha}","trees_url":"https://api.github.com/repos/Demian-Moschin/startup/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Demian-Moschin/startup/statuses/{sha}","languages_url":"https://api.github.com/repos/Demian-Moschin/startup/languages","stargazers_url":"https://api.github.com/repos/Demian-Moschin/startup/stargazers","contributors_url":"https://api.github.com/repos/Demian-Moschin/startup/contributors","subscribers_url":"https://api.github.com/repos/Demian-Moschin/startup/subscribers","subscription_url":"https://api.github.com/repos/Demian-Moschin/startup/subscription","commits_url":"https://api.github.com/repos/Demian-Moschin/startup/commits{/sha}","git_commits_url":"https://api.github.com/repos/Demian-Moschin/startup/git/commits{/sha}","comments_url":"https://api.github.com/repos/Demian-Moschin/startup/comments{/number}","issue_comment_url":"https://api.github.com/repos/Demian-Moschin/startup/issues/comments{/number}","contents_url":"https://api.github.com/repos/Demian-Moschin/startup/contents/{+path}","compare_url":"https://api.github.com/repos/Demian-Moschin/startup/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Demian-Moschin/startup/merges","archive_url":"https://api.github.com/repos/Demian-Moschin/startup/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Demian-Moschin/startup/downloads","issues_url":"https://api.github.com/repos/Demian-Moschin/startup/issues{/number}","pulls_url":"https://api.github.com/repos/Demian-Moschin/startup/pulls{/number}","milestones_url":"https://api.github.com/repos/Demian-Moschin/startup/milestones{/number}","notifications_url":"https://api.github.com/repos/Demian-Moschin/startup/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Demian-Moschin/startup/labels{/name}","releases_url":"https://api.github.com/repos/Demian-Moschin/startup/releases{/id}","created_at":"2015-09-08T03:52:37Z","updated_at":"2015-09-08T04:04:03Z","pushed_at":"2015-09-21T16:14:01Z","git_url":"git://github.com/Demian-Moschin/startup.git","ssh_url":"git@github.com:Demian-Moschin/startup.git","clone_url":"https://github.com/Demian-Moschin/startup.git","svn_url":"https://github.com/Demian-Moschin/startup","homepage":null,"size":16326,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Demian-Moschin/startup/pulls/3"},"html":{"href":"https://github.com/Demian-Moschin/startup/pull/3"},"issue":{"href":"https://api.github.com/repos/Demian-Moschin/startup/issues/3"},"comments":{"href":"https://api.github.com/repos/Demian-Moschin/startup/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/Demian-Moschin/startup/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/Demian-Moschin/startup/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Demian-Moschin/startup/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/Demian-Moschin/startup/statuses/44e3b9b7124445aa5bb042df6b7fa91680831c20"}}}}