{"action":"created","comment":{"url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/pulls/comments/83962219","pull_request_review_id":4771388,"id":83962219,"diff_hunk":"@@ -0,0 +1,55 @@\n+#\n+class RpnCalc\n+\n+  attr_reader :operators\n+\n+  public\n+\n+  def initialize\n+    @operators = {\n+      \"+\" => {\n+        action: Proc.new{|x,y| x+y}},\n+      \"-\" => {\n+        action: Proc.new{|x,y| x-y}},\n+      \"*\" => {\n+        action: Proc.new{|x,y| x*y}},\n+      \"/\" => {\n+        action: Proc.new{|x,y| x/y}},\n+    }\n+  end\n+\n+  \n+  \n+  def evaluate(string)\n+    stack = []\n+    string.split(\" \").each do |token|\n+      if operand? token then\n+        stack.push token\n+      elsif operator? token then\n+        y = stack.pop\n+        x = stack.pop\n+        stack.push applyOperator(x, y, token)\n+      end\n+    end\n+    stack.pop\n+  end\n+\n+  private \n+\n+  def operand?(string)\n+    0 == (string =~ /^\\d+$/)\n+  end\n+\n+\n+  def operator?(string)\n+    @operators.has_key? string\n+  end\n+\n+  def applyOperator(num1, num2, operator)","path":"2016/AlexandrKolesenko/task0/task0.rb","position":48,"original_position":48,"commit_id":"47d84520778543d6d8b84a3f3804a4cd158e6da6","original_commit_id":"47d84520778543d6d8b84a3f3804a4cd158e6da6","user":{"login":"houndci-bot","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci-bot","html_url":"https://github.com/houndci-bot","followers_url":"https://api.github.com/users/houndci-bot/followers","following_url":"https://api.github.com/users/houndci-bot/following{/other_user}","gists_url":"https://api.github.com/users/houndci-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci-bot/subscriptions","organizations_url":"https://api.github.com/users/houndci-bot/orgs","repos_url":"https://api.github.com/users/houndci-bot/repos","events_url":"https://api.github.com/users/houndci-bot/events{/privacy}","received_events_url":"https://api.github.com/users/houndci-bot/received_events","type":"User","site_admin":false},"body":"Use snake_case for method names.","created_at":"2016-10-18T22:14:32Z","updated_at":"2016-10-18T22:14:33Z","html_url":"https://github.com/rubyroidlabs/bsuir-courses/pull/426#discussion_r83962219","pull_request_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/pulls/426","_links":{"self":{"href":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/pulls/comments/83962219"},"html":{"href":"https://github.com/rubyroidlabs/bsuir-courses/pull/426#discussion_r83962219"},"pull_request":{"href":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/pulls/426"}}},"pull_request":{"url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/pulls/426","id":89908788,"html_url":"https://github.com/rubyroidlabs/bsuir-courses/pull/426","diff_url":"https://github.com/rubyroidlabs/bsuir-courses/pull/426.diff","patch_url":"https://github.com/rubyroidlabs/bsuir-courses/pull/426.patch","issue_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/issues/426","number":426,"state":"open","locked":false,"title":"first hw","user":{"login":"aik-stok","id":19826890,"avatar_url":"https://avatars.githubusercontent.com/u/19826890?v=3","gravatar_id":"","url":"https://api.github.com/users/aik-stok","html_url":"https://github.com/aik-stok","followers_url":"https://api.github.com/users/aik-stok/followers","following_url":"https://api.github.com/users/aik-stok/following{/other_user}","gists_url":"https://api.github.com/users/aik-stok/gists{/gist_id}","starred_url":"https://api.github.com/users/aik-stok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aik-stok/subscriptions","organizations_url":"https://api.github.com/users/aik-stok/orgs","repos_url":"https://api.github.com/users/aik-stok/repos","events_url":"https://api.github.com/users/aik-stok/events{/privacy}","received_events_url":"https://api.github.com/users/aik-stok/received_events","type":"User","site_admin":false},"body":"## Фамилия Имя\r\nКолесенко Александр\r\n\r\n## Email\r\naikb2b@gmail.com\r\n\r\n## Номер домашнего задания\r\n1\r\n\r\n## Ссылка на видео с демо работы\r\nLooks like Recordit having a hard time working on Sierra(\r\nSwear to god — my code works! Next time screencast url will be right on this line.\r\n\r\n## Комментарии\r\nНе успел сделать скринкаст. В следующий раз подыщу прогу и сделаю.","created_at":"2016-10-18T22:14:23Z","updated_at":"2016-10-18T22:14:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9ae44e8c9e8c9d8f2d53d837b953a66e4740c560","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/pulls/426/commits","review_comments_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/pulls/426/comments","review_comment_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/issues/426/comments","statuses_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/statuses/47d84520778543d6d8b84a3f3804a4cd158e6da6","head":{"label":"aik-stok:homework-0","ref":"homework-0","sha":"47d84520778543d6d8b84a3f3804a4cd158e6da6","user":{"login":"aik-stok","id":19826890,"avatar_url":"https://avatars.githubusercontent.com/u/19826890?v=3","gravatar_id":"","url":"https://api.github.com/users/aik-stok","html_url":"https://github.com/aik-stok","followers_url":"https://api.github.com/users/aik-stok/followers","following_url":"https://api.github.com/users/aik-stok/following{/other_user}","gists_url":"https://api.github.com/users/aik-stok/gists{/gist_id}","starred_url":"https://api.github.com/users/aik-stok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aik-stok/subscriptions","organizations_url":"https://api.github.com/users/aik-stok/orgs","repos_url":"https://api.github.com/users/aik-stok/repos","events_url":"https://api.github.com/users/aik-stok/events{/privacy}","received_events_url":"https://api.github.com/users/aik-stok/received_events","type":"User","site_admin":false},"repo":{"id":71294080,"name":"bsuir-courses","full_name":"aik-stok/bsuir-courses","owner":{"login":"aik-stok","id":19826890,"avatar_url":"https://avatars.githubusercontent.com/u/19826890?v=3","gravatar_id":"","url":"https://api.github.com/users/aik-stok","html_url":"https://github.com/aik-stok","followers_url":"https://api.github.com/users/aik-stok/followers","following_url":"https://api.github.com/users/aik-stok/following{/other_user}","gists_url":"https://api.github.com/users/aik-stok/gists{/gist_id}","starred_url":"https://api.github.com/users/aik-stok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aik-stok/subscriptions","organizations_url":"https://api.github.com/users/aik-stok/orgs","repos_url":"https://api.github.com/users/aik-stok/repos","events_url":"https://api.github.com/users/aik-stok/events{/privacy}","received_events_url":"https://api.github.com/users/aik-stok/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/aik-stok/bsuir-courses","description":"This is common repository for all student to submit all their homeworks","fork":true,"url":"https://api.github.com/repos/aik-stok/bsuir-courses","forks_url":"https://api.github.com/repos/aik-stok/bsuir-courses/forks","keys_url":"https://api.github.com/repos/aik-stok/bsuir-courses/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aik-stok/bsuir-courses/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aik-stok/bsuir-courses/teams","hooks_url":"https://api.github.com/repos/aik-stok/bsuir-courses/hooks","issue_events_url":"https://api.github.com/repos/aik-stok/bsuir-courses/issues/events{/number}","events_url":"https://api.github.com/repos/aik-stok/bsuir-courses/events","assignees_url":"https://api.github.com/repos/aik-stok/bsuir-courses/assignees{/user}","branches_url":"https://api.github.com/repos/aik-stok/bsuir-courses/branches{/branch}","tags_url":"https://api.github.com/repos/aik-stok/bsuir-courses/tags","blobs_url":"https://api.github.com/repos/aik-stok/bsuir-courses/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aik-stok/bsuir-courses/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aik-stok/bsuir-courses/git/refs{/sha}","trees_url":"https://api.github.com/repos/aik-stok/bsuir-courses/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aik-stok/bsuir-courses/statuses/{sha}","languages_url":"https://api.github.com/repos/aik-stok/bsuir-courses/languages","stargazers_url":"https://api.github.com/repos/aik-stok/bsuir-courses/stargazers","contributors_url":"https://api.github.com/repos/aik-stok/bsuir-courses/contributors","subscribers_url":"https://api.github.com/repos/aik-stok/bsuir-courses/subscribers","subscription_url":"https://api.github.com/repos/aik-stok/bsuir-courses/subscription","commits_url":"https://api.github.com/repos/aik-stok/bsuir-courses/commits{/sha}","git_commits_url":"https://api.github.com/repos/aik-stok/bsuir-courses/git/commits{/sha}","comments_url":"https://api.github.com/repos/aik-stok/bsuir-courses/comments{/number}","issue_comment_url":"https://api.github.com/repos/aik-stok/bsuir-courses/issues/comments{/number}","contents_url":"https://api.github.com/repos/aik-stok/bsuir-courses/contents/{+path}","compare_url":"https://api.github.com/repos/aik-stok/bsuir-courses/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aik-stok/bsuir-courses/merges","archive_url":"https://api.github.com/repos/aik-stok/bsuir-courses/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aik-stok/bsuir-courses/downloads","issues_url":"https://api.github.com/repos/aik-stok/bsuir-courses/issues{/number}","pulls_url":"https://api.github.com/repos/aik-stok/bsuir-courses/pulls{/number}","milestones_url":"https://api.github.com/repos/aik-stok/bsuir-courses/milestones{/number}","notifications_url":"https://api.github.com/repos/aik-stok/bsuir-courses/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aik-stok/bsuir-courses/labels{/name}","releases_url":"https://api.github.com/repos/aik-stok/bsuir-courses/releases{/id}","deployments_url":"https://api.github.com/repos/aik-stok/bsuir-courses/deployments","created_at":"2016-10-18T21:45:03Z","updated_at":"2016-10-18T21:45:05Z","pushed_at":"2016-10-18T21:51:05Z","git_url":"git://github.com/aik-stok/bsuir-courses.git","ssh_url":"git@github.com:aik-stok/bsuir-courses.git","clone_url":"https://github.com/aik-stok/bsuir-courses.git","svn_url":"https://github.com/aik-stok/bsuir-courses","homepage":null,"size":6519,"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":"rubyroidlabs:master","ref":"master","sha":"d0f9d8959f21076a7bbdbe6069587e92a6856557","user":{"login":"rubyroidlabs","id":5137565,"avatar_url":"https://avatars.githubusercontent.com/u/5137565?v=3","gravatar_id":"","url":"https://api.github.com/users/rubyroidlabs","html_url":"https://github.com/rubyroidlabs","followers_url":"https://api.github.com/users/rubyroidlabs/followers","following_url":"https://api.github.com/users/rubyroidlabs/following{/other_user}","gists_url":"https://api.github.com/users/rubyroidlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/rubyroidlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rubyroidlabs/subscriptions","organizations_url":"https://api.github.com/users/rubyroidlabs/orgs","repos_url":"https://api.github.com/users/rubyroidlabs/repos","events_url":"https://api.github.com/users/rubyroidlabs/events{/privacy}","received_events_url":"https://api.github.com/users/rubyroidlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":14405320,"name":"bsuir-courses","full_name":"rubyroidlabs/bsuir-courses","owner":{"login":"rubyroidlabs","id":5137565,"avatar_url":"https://avatars.githubusercontent.com/u/5137565?v=3","gravatar_id":"","url":"https://api.github.com/users/rubyroidlabs","html_url":"https://github.com/rubyroidlabs","followers_url":"https://api.github.com/users/rubyroidlabs/followers","following_url":"https://api.github.com/users/rubyroidlabs/following{/other_user}","gists_url":"https://api.github.com/users/rubyroidlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/rubyroidlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rubyroidlabs/subscriptions","organizations_url":"https://api.github.com/users/rubyroidlabs/orgs","repos_url":"https://api.github.com/users/rubyroidlabs/repos","events_url":"https://api.github.com/users/rubyroidlabs/events{/privacy}","received_events_url":"https://api.github.com/users/rubyroidlabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rubyroidlabs/bsuir-courses","description":"This is common repository for all student to submit all their homeworks","fork":false,"url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses","forks_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/forks","keys_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/teams","hooks_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/hooks","issue_events_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/issues/events{/number}","events_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/events","assignees_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/assignees{/user}","branches_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/branches{/branch}","tags_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/tags","blobs_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/git/refs{/sha}","trees_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/statuses/{sha}","languages_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/languages","stargazers_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/stargazers","contributors_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/contributors","subscribers_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/subscribers","subscription_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/subscription","commits_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/commits{/sha}","git_commits_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/git/commits{/sha}","comments_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/comments{/number}","issue_comment_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/issues/comments{/number}","contents_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/contents/{+path}","compare_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/merges","archive_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/downloads","issues_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/issues{/number}","pulls_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/pulls{/number}","milestones_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/milestones{/number}","notifications_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/labels{/name}","releases_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/releases{/id}","deployments_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/deployments","created_at":"2013-11-14T19:55:12Z","updated_at":"2016-10-18T20:24:26Z","pushed_at":"2016-10-18T22:14:23Z","git_url":"git://github.com/rubyroidlabs/bsuir-courses.git","ssh_url":"git@github.com:rubyroidlabs/bsuir-courses.git","clone_url":"https://github.com/rubyroidlabs/bsuir-courses.git","svn_url":"https://github.com/rubyroidlabs/bsuir-courses","homepage":null,"size":6519,"stargazers_count":26,"watchers_count":26,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":141,"mirror_url":null,"open_issues_count":11,"forks":141,"open_issues":11,"watchers":26,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/pulls/426"},"html":{"href":"https://github.com/rubyroidlabs/bsuir-courses/pull/426"},"issue":{"href":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/issues/426"},"comments":{"href":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/issues/426/comments"},"review_comments":{"href":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/pulls/426/comments"},"review_comment":{"href":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/pulls/426/commits"},"statuses":{"href":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/statuses/47d84520778543d6d8b84a3f3804a4cd158e6da6"}}}}
{"actor":{"display_login":"houndci-bot"}}