{"action":"created","comment":{"url":"https://api.github.com/repos/aleksposte/Thinknetica-ror-basic/pulls/comments/77084010","id":77084010,"diff_hunk":"@@ -0,0 +1,43 @@\n+\n+# Разделить поезда на два типа PassengerTrain и CargoTrain, сделать родителя для классов, \n+# который будет содержать общие методы и свойства\n+\n+# Вагоны теперь делятся на грузовые и пассажирские (отдельные классы). \n+# К пассажирскому поезду можно прицепить только пассажирские, к грузовому - грузовые. \n+# При добавлении вагона к поезду, объект вагона \n+# должен сохраняться во внутреннем массиве поезда, в отличие от предыдущего задания, \n+# где мы считали только кол-во вагонов. \n+# Параметр конструктора \"кол-во вагонов\" при этом можно удалить.\n+\n+class CargoTrain < Train\n+\n+  attr_accessor :cargo\n+                # :type\n+\n+  def initialize(num)\n+      super\n+      @type = 'cargo'\n+  end\n+\n+  def add_carriage(carriage)","path":"Lesson_4-comments/cargo_train.rb","position":22,"original_position":22,"commit_id":"7248b92bd5ada7994f717f403e2513cc953f8a29","original_commit_id":"7248b92bd5ada7994f717f403e2513cc953f8a29","user":{"login":"psylone","id":224141,"avatar_url":"https://avatars.githubusercontent.com/u/224141?v=3","gravatar_id":"","url":"https://api.github.com/users/psylone","html_url":"https://github.com/psylone","followers_url":"https://api.github.com/users/psylone/followers","following_url":"https://api.github.com/users/psylone/following{/other_user}","gists_url":"https://api.github.com/users/psylone/gists{/gist_id}","starred_url":"https://api.github.com/users/psylone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/psylone/subscriptions","organizations_url":"https://api.github.com/users/psylone/orgs","repos_url":"https://api.github.com/users/psylone/repos","events_url":"https://api.github.com/users/psylone/events{/privacy}","received_events_url":"https://api.github.com/users/psylone/received_events","type":"User","site_admin":false},"body":"Этот и метод `delete_carriage` почти полностью повторяют одноимённые методы из `PassengerTrain`. Их нужно вынести в базовый класс.","created_at":"2016-08-31T22:17:48Z","updated_at":"2016-08-31T22:17:48Z","html_url":"https://github.com/aleksposte/Thinknetica-ror-basic/pull/3#discussion_r77084010","pull_request_url":"https://api.github.com/repos/aleksposte/Thinknetica-ror-basic/pulls/3","_links":{"self":{"href":"https://api.github.com/repos/aleksposte/Thinknetica-ror-basic/pulls/comments/77084010"},"html":{"href":"https://github.com/aleksposte/Thinknetica-ror-basic/pull/3#discussion_r77084010"},"pull_request":{"href":"https://api.github.com/repos/aleksposte/Thinknetica-ror-basic/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/aleksposte/Thinknetica-ror-basic/pulls/3","id":83536071,"html_url":"https://github.com/aleksposte/Thinknetica-ror-basic/pull/3","diff_url":"https://github.com/aleksposte/Thinknetica-ror-basic/pull/3.diff","patch_url":"https://github.com/aleksposte/Thinknetica-ror-basic/pull/3.patch","issue_url":"https://api.github.com/repos/aleksposte/Thinknetica-ror-basic/issues/3","number":3,"state":"open","locked":false,"title":"Add lesson 4 comments","user":{"login":"psylone","id":224141,"avatar_url":"https://avatars.githubusercontent.com/u/224141?v=3","gravatar_id":"","url":"https://api.github.com/users/psylone","html_url":"https://github.com/psylone","followers_url":"https://api.github.com/users/psylone/followers","following_url":"https://api.github.com/users/psylone/following{/other_user}","gists_url":"https://api.github.com/users/psylone/gists{/gist_id}","starred_url":"https://api.github.com/users/psylone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/psylone/subscriptions","organizations_url":"https://api.github.com/users/psylone/orgs","repos_url":"https://api.github.com/users/psylone/repos","events_url":"https://api.github.com/users/psylone/events{/privacy}","received_events_url":"https://api.github.com/users/psylone/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-08-31T21:49:30Z","updated_at":"2016-08-31T22:17:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b7e472c41e9ca42dcfebdee32311fb0dfb134add","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/aleksposte/Thinknetica-ror-basic/pulls/3/commits","review_comments_url":"https://api.github.com/repos/aleksposte/Thinknetica-ror-basic/pulls/3/comments","review_comment_url":"https://api.github.com/repos/aleksposte/Thinknetica-ror-basic/pulls/comments{/number}","comments_url":"https://api.github.com/repos/aleksposte/Thinknetica-ror-basic/issues/3/comments","statuses_url":"https://api.github.com/repos/aleksposte/Thinknetica-ror-basic/statuses/7248b92bd5ada7994f717f403e2513cc953f8a29","head":{"label":"psylone:master","ref":"master","sha":"7248b92bd5ada7994f717f403e2513cc953f8a29","user":{"login":"psylone","id":224141,"avatar_url":"https://avatars.githubusercontent.com/u/224141?v=3","gravatar_id":"","url":"https://api.github.com/users/psylone","html_url":"https://github.com/psylone","followers_url":"https://api.github.com/users/psylone/followers","following_url":"https://api.github.com/users/psylone/following{/other_user}","gists_url":"https://api.github.com/users/psylone/gists{/gist_id}","starred_url":"https://api.github.com/users/psylone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/psylone/subscriptions","organizations_url":"https://api.github.com/users/psylone/orgs","repos_url":"https://api.github.com/users/psylone/repos","events_url":"https://api.github.com/users/psylone/events{/privacy}","received_events_url":"https://api.github.com/users/psylone/received_events","type":"User","site_admin":false},"repo":{"id":67075798,"name":"Thinknetica-ror-basic","full_name":"psylone/Thinknetica-ror-basic","owner":{"login":"psylone","id":224141,"avatar_url":"https://avatars.githubusercontent.com/u/224141?v=3","gravatar_id":"","url":"https://api.github.com/users/psylone","html_url":"https://github.com/psylone","followers_url":"https://api.github.com/users/psylone/followers","following_url":"https://api.github.com/users/psylone/following{/other_user}","gists_url":"https://api.github.com/users/psylone/gists{/gist_id}","starred_url":"https://api.github.com/users/psylone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/psylone/subscriptions","organizations_url":"https://api.github.com/users/psylone/orgs","repos_url":"https://api.github.com/users/psylone/repos","events_url":"https://api.github.com/users/psylone/events{/privacy}","received_events_url":"https://api.github.com/users/psylone/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/psylone/Thinknetica-ror-basic","description":null,"fork":true,"url":"https://api.github.com/repos/psylone/Thinknetica-ror-basic","forks_url":"https://api.github.com/repos/psylone/Thinknetica-ror-basic/forks","keys_url":"https://api.github.com/repos/psylone/Thinknetica-ror-basic/keys{/key_id}","collaborators_url":"https://api.github.com/repos/psylone/Thinknetica-ror-basic/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/psylone/Thinknetica-ror-basic/teams","hooks_url":"https://api.github.com/repos/psylone/Thinknetica-ror-basic/hooks","issue_events_url":"https://api.github.com/repos/psylone/Thinknetica-ror-basic/issues/events{/number}","events_url":"https://api.github.com/repos/psylone/Thinknetica-ror-basic/events","assignees_url":"https://api.github.com/repos/psylone/Thinknetica-ror-basic/assignees{/user}","branches_url":"https://api.github.com/repos/psylone/Thinknetica-ror-basic/branches{/branch}","tags_url":"https://api.github.com/repos/psylone/Thinknetica-ror-basic/tags","blobs_url":"https://api.github.com/repos/psylone/Thinknetica-ror-basic/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/psylone/Thinknetica-ror-basic/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/psylone/Thinknetica-ror-basic/git/refs{/sha}","trees_url":"https://api.github.com/repos/psylone/Thinknetica-ror-basic/git/trees{/sha}","statuses_url":"https://api.github.com/repos/psylone/Thinknetica-ror-basic/statuses/{sha}","languages_url":"https://api.github.com/repos/psylone/Thinknetica-ror-basic/languages","stargazers_url":"https://api.github.com/repos/psylone/Thinknetica-ror-basic/stargazers","contributors_url":"https://api.github.com/repos/psylone/Thinknetica-ror-basic/contributors","subscribers_url":"https://api.github.com/repos/psylone/Thinknetica-ror-basic/subscribers","subscription_url":"https://api.github.com/repos/psylone/Thinknetica-ror-basic/subscription","commits_url":"https://api.github.com/repos/psylone/Thinknetica-ror-basic/commits{/sha}","git_commits_url":"https://api.github.com/repos/psylone/Thinknetica-ror-basic/git/commits{/sha}","comments_url":"https://api.github.com/repos/psylone/Thinknetica-ror-basic/comments{/number}","issue_comment_url":"https://api.github.com/repos/psylone/Thinknetica-ror-basic/issues/comments{/number}","contents_url":"https://api.github.com/repos/psylone/Thinknetica-ror-basic/contents/{+path}","compare_url":"https://api.github.com/repos/psylone/Thinknetica-ror-basic/compare/{base}...{head}","merges_url":"https://api.github.com/repos/psylone/Thinknetica-ror-basic/merges","archive_url":"https://api.github.com/repos/psylone/Thinknetica-ror-basic/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/psylone/Thinknetica-ror-basic/downloads","issues_url":"https://api.github.com/repos/psylone/Thinknetica-ror-basic/issues{/number}","pulls_url":"https://api.github.com/repos/psylone/Thinknetica-ror-basic/pulls{/number}","milestones_url":"https://api.github.com/repos/psylone/Thinknetica-ror-basic/milestones{/number}","notifications_url":"https://api.github.com/repos/psylone/Thinknetica-ror-basic/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/psylone/Thinknetica-ror-basic/labels{/name}","releases_url":"https://api.github.com/repos/psylone/Thinknetica-ror-basic/releases{/id}","deployments_url":"https://api.github.com/repos/psylone/Thinknetica-ror-basic/deployments","created_at":"2016-08-31T21:47:05Z","updated_at":"2016-08-31T21:47:19Z","pushed_at":"2016-08-31T21:48:41Z","git_url":"git://github.com/psylone/Thinknetica-ror-basic.git","ssh_url":"git@github.com:psylone/Thinknetica-ror-basic.git","clone_url":"https://github.com/psylone/Thinknetica-ror-basic.git","svn_url":"https://github.com/psylone/Thinknetica-ror-basic","homepage":null,"size":34,"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":"aleksposte:master","ref":"master","sha":"f2d52f43b0b01451c67176acf24589113de7a37a","user":{"login":"aleksposte","id":3026641,"avatar_url":"https://avatars.githubusercontent.com/u/3026641?v=3","gravatar_id":"","url":"https://api.github.com/users/aleksposte","html_url":"https://github.com/aleksposte","followers_url":"https://api.github.com/users/aleksposte/followers","following_url":"https://api.github.com/users/aleksposte/following{/other_user}","gists_url":"https://api.github.com/users/aleksposte/gists{/gist_id}","starred_url":"https://api.github.com/users/aleksposte/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aleksposte/subscriptions","organizations_url":"https://api.github.com/users/aleksposte/orgs","repos_url":"https://api.github.com/users/aleksposte/repos","events_url":"https://api.github.com/users/aleksposte/events{/privacy}","received_events_url":"https://api.github.com/users/aleksposte/received_events","type":"User","site_admin":false},"repo":{"id":65188895,"name":"Thinknetica-ror-basic","full_name":"aleksposte/Thinknetica-ror-basic","owner":{"login":"aleksposte","id":3026641,"avatar_url":"https://avatars.githubusercontent.com/u/3026641?v=3","gravatar_id":"","url":"https://api.github.com/users/aleksposte","html_url":"https://github.com/aleksposte","followers_url":"https://api.github.com/users/aleksposte/followers","following_url":"https://api.github.com/users/aleksposte/following{/other_user}","gists_url":"https://api.github.com/users/aleksposte/gists{/gist_id}","starred_url":"https://api.github.com/users/aleksposte/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aleksposte/subscriptions","organizations_url":"https://api.github.com/users/aleksposte/orgs","repos_url":"https://api.github.com/users/aleksposte/repos","events_url":"https://api.github.com/users/aleksposte/events{/privacy}","received_events_url":"https://api.github.com/users/aleksposte/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/aleksposte/Thinknetica-ror-basic","description":null,"fork":false,"url":"https://api.github.com/repos/aleksposte/Thinknetica-ror-basic","forks_url":"https://api.github.com/repos/aleksposte/Thinknetica-ror-basic/forks","keys_url":"https://api.github.com/repos/aleksposte/Thinknetica-ror-basic/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aleksposte/Thinknetica-ror-basic/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aleksposte/Thinknetica-ror-basic/teams","hooks_url":"https://api.github.com/repos/aleksposte/Thinknetica-ror-basic/hooks","issue_events_url":"https://api.github.com/repos/aleksposte/Thinknetica-ror-basic/issues/events{/number}","events_url":"https://api.github.com/repos/aleksposte/Thinknetica-ror-basic/events","assignees_url":"https://api.github.com/repos/aleksposte/Thinknetica-ror-basic/assignees{/user}","branches_url":"https://api.github.com/repos/aleksposte/Thinknetica-ror-basic/branches{/branch}","tags_url":"https://api.github.com/repos/aleksposte/Thinknetica-ror-basic/tags","blobs_url":"https://api.github.com/repos/aleksposte/Thinknetica-ror-basic/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aleksposte/Thinknetica-ror-basic/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aleksposte/Thinknetica-ror-basic/git/refs{/sha}","trees_url":"https://api.github.com/repos/aleksposte/Thinknetica-ror-basic/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aleksposte/Thinknetica-ror-basic/statuses/{sha}","languages_url":"https://api.github.com/repos/aleksposte/Thinknetica-ror-basic/languages","stargazers_url":"https://api.github.com/repos/aleksposte/Thinknetica-ror-basic/stargazers","contributors_url":"https://api.github.com/repos/aleksposte/Thinknetica-ror-basic/contributors","subscribers_url":"https://api.github.com/repos/aleksposte/Thinknetica-ror-basic/subscribers","subscription_url":"https://api.github.com/repos/aleksposte/Thinknetica-ror-basic/subscription","commits_url":"https://api.github.com/repos/aleksposte/Thinknetica-ror-basic/commits{/sha}","git_commits_url":"https://api.github.com/repos/aleksposte/Thinknetica-ror-basic/git/commits{/sha}","comments_url":"https://api.github.com/repos/aleksposte/Thinknetica-ror-basic/comments{/number}","issue_comment_url":"https://api.github.com/repos/aleksposte/Thinknetica-ror-basic/issues/comments{/number}","contents_url":"https://api.github.com/repos/aleksposte/Thinknetica-ror-basic/contents/{+path}","compare_url":"https://api.github.com/repos/aleksposte/Thinknetica-ror-basic/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aleksposte/Thinknetica-ror-basic/merges","archive_url":"https://api.github.com/repos/aleksposte/Thinknetica-ror-basic/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aleksposte/Thinknetica-ror-basic/downloads","issues_url":"https://api.github.com/repos/aleksposte/Thinknetica-ror-basic/issues{/number}","pulls_url":"https://api.github.com/repos/aleksposte/Thinknetica-ror-basic/pulls{/number}","milestones_url":"https://api.github.com/repos/aleksposte/Thinknetica-ror-basic/milestones{/number}","notifications_url":"https://api.github.com/repos/aleksposte/Thinknetica-ror-basic/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aleksposte/Thinknetica-ror-basic/labels{/name}","releases_url":"https://api.github.com/repos/aleksposte/Thinknetica-ror-basic/releases{/id}","deployments_url":"https://api.github.com/repos/aleksposte/Thinknetica-ror-basic/deployments","created_at":"2016-08-08T08:57:09Z","updated_at":"2016-08-23T14:33:17Z","pushed_at":"2016-08-31T21:49:30Z","git_url":"git://github.com/aleksposte/Thinknetica-ror-basic.git","ssh_url":"git@github.com:aleksposte/Thinknetica-ror-basic.git","clone_url":"https://github.com/aleksposte/Thinknetica-ror-basic.git","svn_url":"https://github.com/aleksposte/Thinknetica-ror-basic","homepage":null,"size":34,"stargazers_count":2,"watchers_count":2,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":2,"forks":1,"open_issues":2,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/aleksposte/Thinknetica-ror-basic/pulls/3"},"html":{"href":"https://github.com/aleksposte/Thinknetica-ror-basic/pull/3"},"issue":{"href":"https://api.github.com/repos/aleksposte/Thinknetica-ror-basic/issues/3"},"comments":{"href":"https://api.github.com/repos/aleksposte/Thinknetica-ror-basic/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/aleksposte/Thinknetica-ror-basic/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/aleksposte/Thinknetica-ror-basic/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/aleksposte/Thinknetica-ror-basic/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/aleksposte/Thinknetica-ror-basic/statuses/7248b92bd5ada7994f717f403e2513cc953f8a29"}}}}
{"actor":{"display_login":"psylone"}}