{"action":"created","comment":{"url":"https://api.github.com/repos/daftcode/ror4beginners2018/pulls/comments/233749941","pull_request_review_id":175234850,"id":233749941,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzMzc0OTk0MQ==","diff_hunk":"@@ -1,12 +1,72 @@\n-class Warrior\n+class Character\n+  attr_reader :name\n+  attr_accessor :level\n+\n   def initialize(name:, level:)\n+    @name = name\n+    @level = level.between?(1, 99) ? level : 1\n   end\n \n   def strength\n+    @level + [*1..12].sample\n+  end\n+\n+  def card\n+    \"#{@name} (lvl #{@level})\"\n   end\n end\n \n+\n+class Warrior < Character\n+end\n+\n+class Monster < Character\n+end\n+\n class BattleArena\n+  attr_accessor :first_character, :second_character\n+\n   def initialize(first_character, second_character)\n+    @first_character = first_character\n+    @second_character = second_character\n+    @first_character_dmg = @first_character.strength\n+    @second_character_dmg = @second_character.strength\n+  end\n+\n+  def battle!\n+    puts \"#{@first_character.card} attacked #{@second_character.card} with #{@first_character_dmg} damage\"\n+    puts \"#{@second_character.card} attacked #{@first_character.card} with #{@second_character_dmg} damage\"\n+    compare_dmg\n+  end\n+\n+  private\n+  \n+  def compare_dmg\n+    if @first_character_dmg === @second_character_dmg","path":"zad2/warriors.rb","position":46,"original_position":46,"commit_id":"7480b300fb77e6f12e188e4fa9f0199f06cea89c","original_commit_id":"7480b300fb77e6f12e188e4fa9f0199f06cea89c","user":{"login":"resool","id":6610488,"node_id":"MDQ6VXNlcjY2MTA0ODg=","avatar_url":"https://avatars3.githubusercontent.com/u/6610488?v=4","gravatar_id":"","url":"https://api.github.com/users/resool","html_url":"https://github.com/resool","followers_url":"https://api.github.com/users/resool/followers","following_url":"https://api.github.com/users/resool/following{/other_user}","gists_url":"https://api.github.com/users/resool/gists{/gist_id}","starred_url":"https://api.github.com/users/resool/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/resool/subscriptions","organizations_url":"https://api.github.com/users/resool/orgs","repos_url":"https://api.github.com/users/resool/repos","events_url":"https://api.github.com/users/resool/events{/privacy}","received_events_url":"https://api.github.com/users/resool/received_events","type":"User","site_admin":false},"body":"`===` raczej bardzo rzadko się używa.\r\n\r\nnajczęściej jest on używany w `case` \"po cichu\". Dzięki temu można robić konstrukcje typu:\r\n```\r\ncase a\r\nwhen 'some string' then x\r\nwhen Integer then y\r\nend\r\n```","created_at":"2018-11-15T08:34:03Z","updated_at":"2018-11-15T08:34:47Z","html_url":"https://github.com/daftcode/ror4beginners2018/pull/114#discussion_r233749941","pull_request_url":"https://api.github.com/repos/daftcode/ror4beginners2018/pulls/114","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/daftcode/ror4beginners2018/pulls/comments/233749941"},"html":{"href":"https://github.com/daftcode/ror4beginners2018/pull/114#discussion_r233749941"},"pull_request":{"href":"https://api.github.com/repos/daftcode/ror4beginners2018/pulls/114"}},"in_reply_to_id":233748923},"pull_request":{"url":"https://api.github.com/repos/daftcode/ror4beginners2018/pulls/114","id":230253275,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMwMjUzMjc1","html_url":"https://github.com/daftcode/ror4beginners2018/pull/114","diff_url":"https://github.com/daftcode/ror4beginners2018/pull/114.diff","patch_url":"https://github.com/daftcode/ror4beginners2018/pull/114.patch","issue_url":"https://api.github.com/repos/daftcode/ror4beginners2018/issues/114","number":114,"state":"open","locked":false,"title":"Task #2 solution","user":{"login":"pawel-zun","id":33136596,"node_id":"MDQ6VXNlcjMzMTM2NTk2","avatar_url":"https://avatars2.githubusercontent.com/u/33136596?v=4","gravatar_id":"","url":"https://api.github.com/users/pawel-zun","html_url":"https://github.com/pawel-zun","followers_url":"https://api.github.com/users/pawel-zun/followers","following_url":"https://api.github.com/users/pawel-zun/following{/other_user}","gists_url":"https://api.github.com/users/pawel-zun/gists{/gist_id}","starred_url":"https://api.github.com/users/pawel-zun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pawel-zun/subscriptions","organizations_url":"https://api.github.com/users/pawel-zun/orgs","repos_url":"https://api.github.com/users/pawel-zun/repos","events_url":"https://api.github.com/users/pawel-zun/events{/privacy}","received_events_url":"https://api.github.com/users/pawel-zun/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-11-12T20:07:06Z","updated_at":"2018-11-15T08:34:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0f8e8c5d70d9ddb8d411d0b2115aed0bbaafe3d2","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/daftcode/ror4beginners2018/pulls/114/commits","review_comments_url":"https://api.github.com/repos/daftcode/ror4beginners2018/pulls/114/comments","review_comment_url":"https://api.github.com/repos/daftcode/ror4beginners2018/pulls/comments{/number}","comments_url":"https://api.github.com/repos/daftcode/ror4beginners2018/issues/114/comments","statuses_url":"https://api.github.com/repos/daftcode/ror4beginners2018/statuses/7480b300fb77e6f12e188e4fa9f0199f06cea89c","head":{"label":"pawel-zun:zad2","ref":"zad2","sha":"7480b300fb77e6f12e188e4fa9f0199f06cea89c","user":{"login":"pawel-zun","id":33136596,"node_id":"MDQ6VXNlcjMzMTM2NTk2","avatar_url":"https://avatars2.githubusercontent.com/u/33136596?v=4","gravatar_id":"","url":"https://api.github.com/users/pawel-zun","html_url":"https://github.com/pawel-zun","followers_url":"https://api.github.com/users/pawel-zun/followers","following_url":"https://api.github.com/users/pawel-zun/following{/other_user}","gists_url":"https://api.github.com/users/pawel-zun/gists{/gist_id}","starred_url":"https://api.github.com/users/pawel-zun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pawel-zun/subscriptions","organizations_url":"https://api.github.com/users/pawel-zun/orgs","repos_url":"https://api.github.com/users/pawel-zun/repos","events_url":"https://api.github.com/users/pawel-zun/events{/privacy}","received_events_url":"https://api.github.com/users/pawel-zun/received_events","type":"User","site_admin":false},"repo":{"id":156269563,"node_id":"MDEwOlJlcG9zaXRvcnkxNTYyNjk1NjM=","name":"ror4beginners2018","full_name":"pawel-zun/ror4beginners2018","private":false,"owner":{"login":"pawel-zun","id":33136596,"node_id":"MDQ6VXNlcjMzMTM2NTk2","avatar_url":"https://avatars2.githubusercontent.com/u/33136596?v=4","gravatar_id":"","url":"https://api.github.com/users/pawel-zun","html_url":"https://github.com/pawel-zun","followers_url":"https://api.github.com/users/pawel-zun/followers","following_url":"https://api.github.com/users/pawel-zun/following{/other_user}","gists_url":"https://api.github.com/users/pawel-zun/gists{/gist_id}","starred_url":"https://api.github.com/users/pawel-zun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pawel-zun/subscriptions","organizations_url":"https://api.github.com/users/pawel-zun/orgs","repos_url":"https://api.github.com/users/pawel-zun/repos","events_url":"https://api.github.com/users/pawel-zun/events{/privacy}","received_events_url":"https://api.github.com/users/pawel-zun/received_events","type":"User","site_admin":false},"html_url":"https://github.com/pawel-zun/ror4beginners2018","description":null,"fork":true,"url":"https://api.github.com/repos/pawel-zun/ror4beginners2018","forks_url":"https://api.github.com/repos/pawel-zun/ror4beginners2018/forks","keys_url":"https://api.github.com/repos/pawel-zun/ror4beginners2018/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pawel-zun/ror4beginners2018/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pawel-zun/ror4beginners2018/teams","hooks_url":"https://api.github.com/repos/pawel-zun/ror4beginners2018/hooks","issue_events_url":"https://api.github.com/repos/pawel-zun/ror4beginners2018/issues/events{/number}","events_url":"https://api.github.com/repos/pawel-zun/ror4beginners2018/events","assignees_url":"https://api.github.com/repos/pawel-zun/ror4beginners2018/assignees{/user}","branches_url":"https://api.github.com/repos/pawel-zun/ror4beginners2018/branches{/branch}","tags_url":"https://api.github.com/repos/pawel-zun/ror4beginners2018/tags","blobs_url":"https://api.github.com/repos/pawel-zun/ror4beginners2018/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pawel-zun/ror4beginners2018/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pawel-zun/ror4beginners2018/git/refs{/sha}","trees_url":"https://api.github.com/repos/pawel-zun/ror4beginners2018/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pawel-zun/ror4beginners2018/statuses/{sha}","languages_url":"https://api.github.com/repos/pawel-zun/ror4beginners2018/languages","stargazers_url":"https://api.github.com/repos/pawel-zun/ror4beginners2018/stargazers","contributors_url":"https://api.github.com/repos/pawel-zun/ror4beginners2018/contributors","subscribers_url":"https://api.github.com/repos/pawel-zun/ror4beginners2018/subscribers","subscription_url":"https://api.github.com/repos/pawel-zun/ror4beginners2018/subscription","commits_url":"https://api.github.com/repos/pawel-zun/ror4beginners2018/commits{/sha}","git_commits_url":"https://api.github.com/repos/pawel-zun/ror4beginners2018/git/commits{/sha}","comments_url":"https://api.github.com/repos/pawel-zun/ror4beginners2018/comments{/number}","issue_comment_url":"https://api.github.com/repos/pawel-zun/ror4beginners2018/issues/comments{/number}","contents_url":"https://api.github.com/repos/pawel-zun/ror4beginners2018/contents/{+path}","compare_url":"https://api.github.com/repos/pawel-zun/ror4beginners2018/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pawel-zun/ror4beginners2018/merges","archive_url":"https://api.github.com/repos/pawel-zun/ror4beginners2018/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pawel-zun/ror4beginners2018/downloads","issues_url":"https://api.github.com/repos/pawel-zun/ror4beginners2018/issues{/number}","pulls_url":"https://api.github.com/repos/pawel-zun/ror4beginners2018/pulls{/number}","milestones_url":"https://api.github.com/repos/pawel-zun/ror4beginners2018/milestones{/number}","notifications_url":"https://api.github.com/repos/pawel-zun/ror4beginners2018/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pawel-zun/ror4beginners2018/labels{/name}","releases_url":"https://api.github.com/repos/pawel-zun/ror4beginners2018/releases{/id}","deployments_url":"https://api.github.com/repos/pawel-zun/ror4beginners2018/deployments","created_at":"2018-11-05T19:15:24Z","updated_at":"2018-11-05T19:15:26Z","pushed_at":"2018-11-12T20:05:50Z","git_url":"git://github.com/pawel-zun/ror4beginners2018.git","ssh_url":"git@github.com:pawel-zun/ror4beginners2018.git","clone_url":"https://github.com/pawel-zun/ror4beginners2018.git","svn_url":"https://github.com/pawel-zun/ror4beginners2018","homepage":null,"size":1088,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"daftcode:master","ref":"master","sha":"8877dacd83fd5525dc5a78276560f23d25ef1604","user":{"login":"daftcode","id":10532199,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwNTMyMTk5","avatar_url":"https://avatars2.githubusercontent.com/u/10532199?v=4","gravatar_id":"","url":"https://api.github.com/users/daftcode","html_url":"https://github.com/daftcode","followers_url":"https://api.github.com/users/daftcode/followers","following_url":"https://api.github.com/users/daftcode/following{/other_user}","gists_url":"https://api.github.com/users/daftcode/gists{/gist_id}","starred_url":"https://api.github.com/users/daftcode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daftcode/subscriptions","organizations_url":"https://api.github.com/users/daftcode/orgs","repos_url":"https://api.github.com/users/daftcode/repos","events_url":"https://api.github.com/users/daftcode/events{/privacy}","received_events_url":"https://api.github.com/users/daftcode/received_events","type":"Organization","site_admin":false},"repo":{"id":155549821,"node_id":"MDEwOlJlcG9zaXRvcnkxNTU1NDk4MjE=","name":"ror4beginners2018","full_name":"daftcode/ror4beginners2018","private":false,"owner":{"login":"daftcode","id":10532199,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwNTMyMTk5","avatar_url":"https://avatars2.githubusercontent.com/u/10532199?v=4","gravatar_id":"","url":"https://api.github.com/users/daftcode","html_url":"https://github.com/daftcode","followers_url":"https://api.github.com/users/daftcode/followers","following_url":"https://api.github.com/users/daftcode/following{/other_user}","gists_url":"https://api.github.com/users/daftcode/gists{/gist_id}","starred_url":"https://api.github.com/users/daftcode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daftcode/subscriptions","organizations_url":"https://api.github.com/users/daftcode/orgs","repos_url":"https://api.github.com/users/daftcode/repos","events_url":"https://api.github.com/users/daftcode/events{/privacy}","received_events_url":"https://api.github.com/users/daftcode/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/daftcode/ror4beginners2018","description":null,"fork":false,"url":"https://api.github.com/repos/daftcode/ror4beginners2018","forks_url":"https://api.github.com/repos/daftcode/ror4beginners2018/forks","keys_url":"https://api.github.com/repos/daftcode/ror4beginners2018/keys{/key_id}","collaborators_url":"https://api.github.com/repos/daftcode/ror4beginners2018/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/daftcode/ror4beginners2018/teams","hooks_url":"https://api.github.com/repos/daftcode/ror4beginners2018/hooks","issue_events_url":"https://api.github.com/repos/daftcode/ror4beginners2018/issues/events{/number}","events_url":"https://api.github.com/repos/daftcode/ror4beginners2018/events","assignees_url":"https://api.github.com/repos/daftcode/ror4beginners2018/assignees{/user}","branches_url":"https://api.github.com/repos/daftcode/ror4beginners2018/branches{/branch}","tags_url":"https://api.github.com/repos/daftcode/ror4beginners2018/tags","blobs_url":"https://api.github.com/repos/daftcode/ror4beginners2018/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/daftcode/ror4beginners2018/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/daftcode/ror4beginners2018/git/refs{/sha}","trees_url":"https://api.github.com/repos/daftcode/ror4beginners2018/git/trees{/sha}","statuses_url":"https://api.github.com/repos/daftcode/ror4beginners2018/statuses/{sha}","languages_url":"https://api.github.com/repos/daftcode/ror4beginners2018/languages","stargazers_url":"https://api.github.com/repos/daftcode/ror4beginners2018/stargazers","contributors_url":"https://api.github.com/repos/daftcode/ror4beginners2018/contributors","subscribers_url":"https://api.github.com/repos/daftcode/ror4beginners2018/subscribers","subscription_url":"https://api.github.com/repos/daftcode/ror4beginners2018/subscription","commits_url":"https://api.github.com/repos/daftcode/ror4beginners2018/commits{/sha}","git_commits_url":"https://api.github.com/repos/daftcode/ror4beginners2018/git/commits{/sha}","comments_url":"https://api.github.com/repos/daftcode/ror4beginners2018/comments{/number}","issue_comment_url":"https://api.github.com/repos/daftcode/ror4beginners2018/issues/comments{/number}","contents_url":"https://api.github.com/repos/daftcode/ror4beginners2018/contents/{+path}","compare_url":"https://api.github.com/repos/daftcode/ror4beginners2018/compare/{base}...{head}","merges_url":"https://api.github.com/repos/daftcode/ror4beginners2018/merges","archive_url":"https://api.github.com/repos/daftcode/ror4beginners2018/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/daftcode/ror4beginners2018/downloads","issues_url":"https://api.github.com/repos/daftcode/ror4beginners2018/issues{/number}","pulls_url":"https://api.github.com/repos/daftcode/ror4beginners2018/pulls{/number}","milestones_url":"https://api.github.com/repos/daftcode/ror4beginners2018/milestones{/number}","notifications_url":"https://api.github.com/repos/daftcode/ror4beginners2018/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/daftcode/ror4beginners2018/labels{/name}","releases_url":"https://api.github.com/repos/daftcode/ror4beginners2018/releases{/id}","deployments_url":"https://api.github.com/repos/daftcode/ror4beginners2018/deployments","created_at":"2018-10-31T11:56:32Z","updated_at":"2018-11-14T23:05:10Z","pushed_at":"2018-11-15T01:01:25Z","git_url":"git://github.com/daftcode/ror4beginners2018.git","ssh_url":"git@github.com:daftcode/ror4beginners2018.git","clone_url":"https://github.com/daftcode/ror4beginners2018.git","svn_url":"https://github.com/daftcode/ror4beginners2018","homepage":null,"size":1996,"stargazers_count":9,"watchers_count":9,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":81,"mirror_url":null,"archived":false,"open_issues_count":60,"license":null,"forks":81,"open_issues":60,"watchers":9,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/daftcode/ror4beginners2018/pulls/114"},"html":{"href":"https://github.com/daftcode/ror4beginners2018/pull/114"},"issue":{"href":"https://api.github.com/repos/daftcode/ror4beginners2018/issues/114"},"comments":{"href":"https://api.github.com/repos/daftcode/ror4beginners2018/issues/114/comments"},"review_comments":{"href":"https://api.github.com/repos/daftcode/ror4beginners2018/pulls/114/comments"},"review_comment":{"href":"https://api.github.com/repos/daftcode/ror4beginners2018/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/daftcode/ror4beginners2018/pulls/114/commits"},"statuses":{"href":"https://api.github.com/repos/daftcode/ror4beginners2018/statuses/7480b300fb77e6f12e188e4fa9f0199f06cea89c"}},"author_association":"NONE"}}
{"actor":{"display_login":"resool"}}