{"action":"created","comment":{"url":"https://api.github.com/repos/MakersSweden/takeaway-challenge/pulls/comments/39486323","id":39486323,"diff_hunk":"@@ -0,0 +1,84 @@\n+require './lib/customer.rb'\n+require './lib/order_confirmation'\n+\n+class Restaurant\n+  include OrderConfirmation\n+\n+\n+  attr_accessor :order\n+\n+  def initialize\n+    super\n+    @order = []\n+    # @menu = [{name: \"Fried rice\", price: 65},\n+    #           {name: \"Fried noodles\", price: 75},\n+    #           {name: \"Curry stew\", price: 90},\n+    #           {name: \"Tandoori chicken\", price: 95},\n+    #           {name: \"Chikken tikka\", price: 70}]\n+  end\n+\n+\n+\n+  def welcome\n+    puts 'Welcome to my restaurant.'\n+    puts 'Please order from our menu below.'\n+    show_menu\n+  end\n+\n+  def menu\n+      @menu = [{name: \"Fried rice\", price: 65},\n+              {name: \"Fried noodles\", price: 75},\n+              {name: \"Curry stew\", price: 90},\n+              {name: \"Tandoori chicken\", price: 95},\n+              {name: \"Chikken tikka\", price: 70}]\n+  end\n+\n+  def show_menu\n+    menu.each_with_index do |item, index|\n+      puts \"#{index} #{item[:name]} #{item[:price]} kr\"\n+    end\n+    add_to_order\n+  end\n+\n+  def user_input\n+    user_input = gets.chomp.to_i\n+  end\n+\n+  def verify_input_dish(dish)\n+    dish >=0 && dish < 4 ? true : false\n+  end\n+\n+  def verify_input_qty(qty)\n+    qty >=0 && qty < 10 ? true : false\n+  end\n+\n+  def add_to_order#(qty, dish)","path":"lib/restaurant.rb","position":55,"original_position":55,"commit_id":"1896ad1ba5852f4deb7df39e29ea14f27dc8a67f","original_commit_id":"1896ad1ba5852f4deb7df39e29ea14f27dc8a67f","user":{"login":"houndci","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci","html_url":"https://github.com/houndci","followers_url":"https://api.github.com/users/houndci/followers","following_url":"https://api.github.com/users/houndci/following{/other_user}","gists_url":"https://api.github.com/users/houndci/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci/subscriptions","organizations_url":"https://api.github.com/users/houndci/orgs","repos_url":"https://api.github.com/users/houndci/repos","events_url":"https://api.github.com/users/houndci/events{/privacy}","received_events_url":"https://api.github.com/users/houndci/received_events","type":"User","site_admin":false},"body":"Metrics/AbcSize: Assignment Branch Condition size for add_to_order is too high. [15.26/15]","created_at":"2015-09-15T08:37:21Z","updated_at":"2015-09-15T08:37:21Z","html_url":"https://github.com/MakersSweden/takeaway-challenge/pull/3#discussion_r39486323","pull_request_url":"https://api.github.com/repos/MakersSweden/takeaway-challenge/pulls/3","_links":{"self":{"href":"https://api.github.com/repos/MakersSweden/takeaway-challenge/pulls/comments/39486323"},"html":{"href":"https://github.com/MakersSweden/takeaway-challenge/pull/3#discussion_r39486323"},"pull_request":{"href":"https://api.github.com/repos/MakersSweden/takeaway-challenge/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/MakersSweden/takeaway-challenge/pulls/3","id":44850908,"html_url":"https://github.com/MakersSweden/takeaway-challenge/pull/3","diff_url":"https://github.com/MakersSweden/takeaway-challenge/pull/3.diff","patch_url":"https://github.com/MakersSweden/takeaway-challenge/pull/3.patch","issue_url":"https://api.github.com/repos/MakersSweden/takeaway-challenge/issues/3","number":3,"state":"open","locked":false,"title":"Created files and added first passing tests to restaurant","user":{"login":"gustafr","id":13725973,"avatar_url":"https://avatars.githubusercontent.com/u/13725973?v=3","gravatar_id":"","url":"https://api.github.com/users/gustafr","html_url":"https://github.com/gustafr","followers_url":"https://api.github.com/users/gustafr/followers","following_url":"https://api.github.com/users/gustafr/following{/other_user}","gists_url":"https://api.github.com/users/gustafr/gists{/gist_id}","starred_url":"https://api.github.com/users/gustafr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gustafr/subscriptions","organizations_url":"https://api.github.com/users/gustafr/orgs","repos_url":"https://api.github.com/users/gustafr/repos","events_url":"https://api.github.com/users/gustafr/events{/privacy}","received_events_url":"https://api.github.com/users/gustafr/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-09-12T10:13:57Z","updated_at":"2015-09-15T08:37:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3cbfbd94fe3f3f1208e6ec54c3c11f00c8f4c3c2","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/MakersSweden/takeaway-challenge/pulls/3/commits","review_comments_url":"https://api.github.com/repos/MakersSweden/takeaway-challenge/pulls/3/comments","review_comment_url":"https://api.github.com/repos/MakersSweden/takeaway-challenge/pulls/comments{/number}","comments_url":"https://api.github.com/repos/MakersSweden/takeaway-challenge/issues/3/comments","statuses_url":"https://api.github.com/repos/MakersSweden/takeaway-challenge/statuses/1896ad1ba5852f4deb7df39e29ea14f27dc8a67f","head":{"label":"gustafr:master","ref":"master","sha":"1896ad1ba5852f4deb7df39e29ea14f27dc8a67f","user":{"login":"gustafr","id":13725973,"avatar_url":"https://avatars.githubusercontent.com/u/13725973?v=3","gravatar_id":"","url":"https://api.github.com/users/gustafr","html_url":"https://github.com/gustafr","followers_url":"https://api.github.com/users/gustafr/followers","following_url":"https://api.github.com/users/gustafr/following{/other_user}","gists_url":"https://api.github.com/users/gustafr/gists{/gist_id}","starred_url":"https://api.github.com/users/gustafr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gustafr/subscriptions","organizations_url":"https://api.github.com/users/gustafr/orgs","repos_url":"https://api.github.com/users/gustafr/repos","events_url":"https://api.github.com/users/gustafr/events{/privacy}","received_events_url":"https://api.github.com/users/gustafr/received_events","type":"User","site_admin":false},"repo":{"id":42314883,"name":"takeaway-challenge","full_name":"gustafr/takeaway-challenge","owner":{"login":"gustafr","id":13725973,"avatar_url":"https://avatars.githubusercontent.com/u/13725973?v=3","gravatar_id":"","url":"https://api.github.com/users/gustafr","html_url":"https://github.com/gustafr","followers_url":"https://api.github.com/users/gustafr/followers","following_url":"https://api.github.com/users/gustafr/following{/other_user}","gists_url":"https://api.github.com/users/gustafr/gists{/gist_id}","starred_url":"https://api.github.com/users/gustafr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gustafr/subscriptions","organizations_url":"https://api.github.com/users/gustafr/orgs","repos_url":"https://api.github.com/users/gustafr/repos","events_url":"https://api.github.com/users/gustafr/events{/privacy}","received_events_url":"https://api.github.com/users/gustafr/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gustafr/takeaway-challenge","description":"Use the Twilio Gem to order food","fork":true,"url":"https://api.github.com/repos/gustafr/takeaway-challenge","forks_url":"https://api.github.com/repos/gustafr/takeaway-challenge/forks","keys_url":"https://api.github.com/repos/gustafr/takeaway-challenge/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gustafr/takeaway-challenge/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gustafr/takeaway-challenge/teams","hooks_url":"https://api.github.com/repos/gustafr/takeaway-challenge/hooks","issue_events_url":"https://api.github.com/repos/gustafr/takeaway-challenge/issues/events{/number}","events_url":"https://api.github.com/repos/gustafr/takeaway-challenge/events","assignees_url":"https://api.github.com/repos/gustafr/takeaway-challenge/assignees{/user}","branches_url":"https://api.github.com/repos/gustafr/takeaway-challenge/branches{/branch}","tags_url":"https://api.github.com/repos/gustafr/takeaway-challenge/tags","blobs_url":"https://api.github.com/repos/gustafr/takeaway-challenge/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gustafr/takeaway-challenge/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gustafr/takeaway-challenge/git/refs{/sha}","trees_url":"https://api.github.com/repos/gustafr/takeaway-challenge/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gustafr/takeaway-challenge/statuses/{sha}","languages_url":"https://api.github.com/repos/gustafr/takeaway-challenge/languages","stargazers_url":"https://api.github.com/repos/gustafr/takeaway-challenge/stargazers","contributors_url":"https://api.github.com/repos/gustafr/takeaway-challenge/contributors","subscribers_url":"https://api.github.com/repos/gustafr/takeaway-challenge/subscribers","subscription_url":"https://api.github.com/repos/gustafr/takeaway-challenge/subscription","commits_url":"https://api.github.com/repos/gustafr/takeaway-challenge/commits{/sha}","git_commits_url":"https://api.github.com/repos/gustafr/takeaway-challenge/git/commits{/sha}","comments_url":"https://api.github.com/repos/gustafr/takeaway-challenge/comments{/number}","issue_comment_url":"https://api.github.com/repos/gustafr/takeaway-challenge/issues/comments{/number}","contents_url":"https://api.github.com/repos/gustafr/takeaway-challenge/contents/{+path}","compare_url":"https://api.github.com/repos/gustafr/takeaway-challenge/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gustafr/takeaway-challenge/merges","archive_url":"https://api.github.com/repos/gustafr/takeaway-challenge/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gustafr/takeaway-challenge/downloads","issues_url":"https://api.github.com/repos/gustafr/takeaway-challenge/issues{/number}","pulls_url":"https://api.github.com/repos/gustafr/takeaway-challenge/pulls{/number}","milestones_url":"https://api.github.com/repos/gustafr/takeaway-challenge/milestones{/number}","notifications_url":"https://api.github.com/repos/gustafr/takeaway-challenge/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gustafr/takeaway-challenge/labels{/name}","releases_url":"https://api.github.com/repos/gustafr/takeaway-challenge/releases{/id}","created_at":"2015-09-11T14:58:33Z","updated_at":"2015-09-11T14:58:35Z","pushed_at":"2015-09-15T08:37:14Z","git_url":"git://github.com/gustafr/takeaway-challenge.git","ssh_url":"git@github.com:gustafr/takeaway-challenge.git","clone_url":"https://github.com/gustafr/takeaway-challenge.git","svn_url":"https://github.com/gustafr/takeaway-challenge","homepage":null,"size":129,"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":"MakersSweden:master","ref":"master","sha":"6ce69ed1f5b29db4f99ce1b4f12fe3e927e693dd","user":{"login":"MakersSweden","id":12081851,"avatar_url":"https://avatars.githubusercontent.com/u/12081851?v=3","gravatar_id":"","url":"https://api.github.com/users/MakersSweden","html_url":"https://github.com/MakersSweden","followers_url":"https://api.github.com/users/MakersSweden/followers","following_url":"https://api.github.com/users/MakersSweden/following{/other_user}","gists_url":"https://api.github.com/users/MakersSweden/gists{/gist_id}","starred_url":"https://api.github.com/users/MakersSweden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MakersSweden/subscriptions","organizations_url":"https://api.github.com/users/MakersSweden/orgs","repos_url":"https://api.github.com/users/MakersSweden/repos","events_url":"https://api.github.com/users/MakersSweden/events{/privacy}","received_events_url":"https://api.github.com/users/MakersSweden/received_events","type":"Organization","site_admin":false},"repo":{"id":42292518,"name":"takeaway-challenge","full_name":"MakersSweden/takeaway-challenge","owner":{"login":"MakersSweden","id":12081851,"avatar_url":"https://avatars.githubusercontent.com/u/12081851?v=3","gravatar_id":"","url":"https://api.github.com/users/MakersSweden","html_url":"https://github.com/MakersSweden","followers_url":"https://api.github.com/users/MakersSweden/followers","following_url":"https://api.github.com/users/MakersSweden/following{/other_user}","gists_url":"https://api.github.com/users/MakersSweden/gists{/gist_id}","starred_url":"https://api.github.com/users/MakersSweden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MakersSweden/subscriptions","organizations_url":"https://api.github.com/users/MakersSweden/orgs","repos_url":"https://api.github.com/users/MakersSweden/repos","events_url":"https://api.github.com/users/MakersSweden/events{/privacy}","received_events_url":"https://api.github.com/users/MakersSweden/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/MakersSweden/takeaway-challenge","description":"Use the Twilio Gem to order food","fork":true,"url":"https://api.github.com/repos/MakersSweden/takeaway-challenge","forks_url":"https://api.github.com/repos/MakersSweden/takeaway-challenge/forks","keys_url":"https://api.github.com/repos/MakersSweden/takeaway-challenge/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MakersSweden/takeaway-challenge/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MakersSweden/takeaway-challenge/teams","hooks_url":"https://api.github.com/repos/MakersSweden/takeaway-challenge/hooks","issue_events_url":"https://api.github.com/repos/MakersSweden/takeaway-challenge/issues/events{/number}","events_url":"https://api.github.com/repos/MakersSweden/takeaway-challenge/events","assignees_url":"https://api.github.com/repos/MakersSweden/takeaway-challenge/assignees{/user}","branches_url":"https://api.github.com/repos/MakersSweden/takeaway-challenge/branches{/branch}","tags_url":"https://api.github.com/repos/MakersSweden/takeaway-challenge/tags","blobs_url":"https://api.github.com/repos/MakersSweden/takeaway-challenge/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MakersSweden/takeaway-challenge/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MakersSweden/takeaway-challenge/git/refs{/sha}","trees_url":"https://api.github.com/repos/MakersSweden/takeaway-challenge/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MakersSweden/takeaway-challenge/statuses/{sha}","languages_url":"https://api.github.com/repos/MakersSweden/takeaway-challenge/languages","stargazers_url":"https://api.github.com/repos/MakersSweden/takeaway-challenge/stargazers","contributors_url":"https://api.github.com/repos/MakersSweden/takeaway-challenge/contributors","subscribers_url":"https://api.github.com/repos/MakersSweden/takeaway-challenge/subscribers","subscription_url":"https://api.github.com/repos/MakersSweden/takeaway-challenge/subscription","commits_url":"https://api.github.com/repos/MakersSweden/takeaway-challenge/commits{/sha}","git_commits_url":"https://api.github.com/repos/MakersSweden/takeaway-challenge/git/commits{/sha}","comments_url":"https://api.github.com/repos/MakersSweden/takeaway-challenge/comments{/number}","issue_comment_url":"https://api.github.com/repos/MakersSweden/takeaway-challenge/issues/comments{/number}","contents_url":"https://api.github.com/repos/MakersSweden/takeaway-challenge/contents/{+path}","compare_url":"https://api.github.com/repos/MakersSweden/takeaway-challenge/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MakersSweden/takeaway-challenge/merges","archive_url":"https://api.github.com/repos/MakersSweden/takeaway-challenge/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MakersSweden/takeaway-challenge/downloads","issues_url":"https://api.github.com/repos/MakersSweden/takeaway-challenge/issues{/number}","pulls_url":"https://api.github.com/repos/MakersSweden/takeaway-challenge/pulls{/number}","milestones_url":"https://api.github.com/repos/MakersSweden/takeaway-challenge/milestones{/number}","notifications_url":"https://api.github.com/repos/MakersSweden/takeaway-challenge/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MakersSweden/takeaway-challenge/labels{/name}","releases_url":"https://api.github.com/repos/MakersSweden/takeaway-challenge/releases{/id}","created_at":"2015-09-11T06:48:45Z","updated_at":"2015-09-11T06:48:45Z","pushed_at":"2015-09-15T08:37:15Z","git_url":"git://github.com/MakersSweden/takeaway-challenge.git","ssh_url":"git@github.com:MakersSweden/takeaway-challenge.git","clone_url":"https://github.com/MakersSweden/takeaway-challenge.git","svn_url":"https://github.com/MakersSweden/takeaway-challenge","homepage":null,"size":281,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":5,"forks":5,"open_issues":5,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/MakersSweden/takeaway-challenge/pulls/3"},"html":{"href":"https://github.com/MakersSweden/takeaway-challenge/pull/3"},"issue":{"href":"https://api.github.com/repos/MakersSweden/takeaway-challenge/issues/3"},"comments":{"href":"https://api.github.com/repos/MakersSweden/takeaway-challenge/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/MakersSweden/takeaway-challenge/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/MakersSweden/takeaway-challenge/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/MakersSweden/takeaway-challenge/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/MakersSweden/takeaway-challenge/statuses/1896ad1ba5852f4deb7df39e29ea14f27dc8a67f"}}}}