{"action":"created","comment":{"url":"https://api.github.com/repos/bestwebua/homework-03-factory/pulls/comments/194383573","pull_request_review_id":127543595,"id":194383573,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NDM4MzU3Mw==","diff_hunk":"@@ -0,0 +1,139 @@\n+class String\n+  def is_a_const?\n+    [/\\A[A-Z]{1}[a-zA-Z0-9_]+\\z/]\n+  end\n+end\n+\n+class Factory\n+\n+  include Enumerable\n+\n+  def self.new(*args)\n+    constant = args[0].is_a?(String) && args[0].is_a_const? ? args[0] : nil","path":"factory.rb","position":12,"original_position":12,"commit_id":"cdde09f812053f90709c93bf5f085f7c332ae2ff","original_commit_id":"cdde09f812053f90709c93bf5f085f7c332ae2ff","user":{"login":"bestwebua","id":14002692,"node_id":"MDQ6VXNlcjE0MDAyNjky","avatar_url":"https://avatars2.githubusercontent.com/u/14002692?v=4","gravatar_id":"","url":"https://api.github.com/users/bestwebua","html_url":"https://github.com/bestwebua","followers_url":"https://api.github.com/users/bestwebua/followers","following_url":"https://api.github.com/users/bestwebua/following{/other_user}","gists_url":"https://api.github.com/users/bestwebua/gists{/gist_id}","starred_url":"https://api.github.com/users/bestwebua/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bestwebua/subscriptions","organizations_url":"https://api.github.com/users/bestwebua/orgs","repos_url":"https://api.github.com/users/bestwebua/repos","events_url":"https://api.github.com/users/bestwebua/events{/privacy}","received_events_url":"https://api.github.com/users/bestwebua/received_events","type":"User","site_admin":false},"body":"Нет конечно. Попробуй передай в качестве аргумента число и вызови на нем этот метод - получишь исключение NoMethodError. В любом случае это более правильный вариант вынести всю проеврку целиком в отдельный метод:\r\n\r\n```ruby\r\nclass Object\r\n  def a_const?\r\n    is_a?(String) && [/\\A[A-Z]{1}[a-zA-Z0-9_]+\\z/]\r\n  end\r\nend\r\n```\r\n\r\nFixed.","created_at":"2018-06-11T12:21:00Z","updated_at":"2018-06-11T12:21:01Z","html_url":"https://github.com/bestwebua/homework-03-factory/pull/1#discussion_r194383573","pull_request_url":"https://api.github.com/repos/bestwebua/homework-03-factory/pulls/1","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/bestwebua/homework-03-factory/pulls/comments/194383573"},"html":{"href":"https://github.com/bestwebua/homework-03-factory/pull/1#discussion_r194383573"},"pull_request":{"href":"https://api.github.com/repos/bestwebua/homework-03-factory/pulls/1"}},"in_reply_to_id":194332239},"pull_request":{"url":"https://api.github.com/repos/bestwebua/homework-03-factory/pulls/1","id":187796855,"node_id":"MDExOlB1bGxSZXF1ZXN0MTg3Nzk2ODU1","html_url":"https://github.com/bestwebua/homework-03-factory/pull/1","diff_url":"https://github.com/bestwebua/homework-03-factory/pull/1.diff","patch_url":"https://github.com/bestwebua/homework-03-factory/pull/1.patch","issue_url":"https://api.github.com/repos/bestwebua/homework-03-factory/issues/1","number":1,"state":"open","locked":false,"title":"Ready for review","user":{"login":"bestwebua","id":14002692,"node_id":"MDQ6VXNlcjE0MDAyNjky","avatar_url":"https://avatars2.githubusercontent.com/u/14002692?v=4","gravatar_id":"","url":"https://api.github.com/users/bestwebua","html_url":"https://github.com/bestwebua","followers_url":"https://api.github.com/users/bestwebua/followers","following_url":"https://api.github.com/users/bestwebua/following{/other_user}","gists_url":"https://api.github.com/users/bestwebua/gists{/gist_id}","starred_url":"https://api.github.com/users/bestwebua/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bestwebua/subscriptions","organizations_url":"https://api.github.com/users/bestwebua/orgs","repos_url":"https://api.github.com/users/bestwebua/repos","events_url":"https://api.github.com/users/bestwebua/events{/privacy}","received_events_url":"https://api.github.com/users/bestwebua/received_events","type":"User","site_admin":false},"body":"Base version of Factory project is ready for review.","created_at":"2018-05-14T11:28:35Z","updated_at":"2018-06-11T12:21:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"00c2514c34f661130502846c810698a4f946fc98","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/bestwebua/homework-03-factory/pulls/1/commits","review_comments_url":"https://api.github.com/repos/bestwebua/homework-03-factory/pulls/1/comments","review_comment_url":"https://api.github.com/repos/bestwebua/homework-03-factory/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bestwebua/homework-03-factory/issues/1/comments","statuses_url":"https://api.github.com/repos/bestwebua/homework-03-factory/statuses/cdde09f812053f90709c93bf5f085f7c332ae2ff","head":{"label":"bestwebua:feature/base_version","ref":"feature/base_version","sha":"cdde09f812053f90709c93bf5f085f7c332ae2ff","user":{"login":"bestwebua","id":14002692,"node_id":"MDQ6VXNlcjE0MDAyNjky","avatar_url":"https://avatars2.githubusercontent.com/u/14002692?v=4","gravatar_id":"","url":"https://api.github.com/users/bestwebua","html_url":"https://github.com/bestwebua","followers_url":"https://api.github.com/users/bestwebua/followers","following_url":"https://api.github.com/users/bestwebua/following{/other_user}","gists_url":"https://api.github.com/users/bestwebua/gists{/gist_id}","starred_url":"https://api.github.com/users/bestwebua/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bestwebua/subscriptions","organizations_url":"https://api.github.com/users/bestwebua/orgs","repos_url":"https://api.github.com/users/bestwebua/repos","events_url":"https://api.github.com/users/bestwebua/events{/privacy}","received_events_url":"https://api.github.com/users/bestwebua/received_events","type":"User","site_admin":false},"repo":{"id":132404149,"node_id":"MDEwOlJlcG9zaXRvcnkxMzI0MDQxNDk=","name":"homework-03-factory","full_name":"bestwebua/homework-03-factory","owner":{"login":"bestwebua","id":14002692,"node_id":"MDQ6VXNlcjE0MDAyNjky","avatar_url":"https://avatars2.githubusercontent.com/u/14002692?v=4","gravatar_id":"","url":"https://api.github.com/users/bestwebua","html_url":"https://github.com/bestwebua","followers_url":"https://api.github.com/users/bestwebua/followers","following_url":"https://api.github.com/users/bestwebua/following{/other_user}","gists_url":"https://api.github.com/users/bestwebua/gists{/gist_id}","starred_url":"https://api.github.com/users/bestwebua/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bestwebua/subscriptions","organizations_url":"https://api.github.com/users/bestwebua/orgs","repos_url":"https://api.github.com/users/bestwebua/repos","events_url":"https://api.github.com/users/bestwebua/events{/privacy}","received_events_url":"https://api.github.com/users/bestwebua/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bestwebua/homework-03-factory","description":"Class with the same behavior like Struct.","fork":false,"url":"https://api.github.com/repos/bestwebua/homework-03-factory","forks_url":"https://api.github.com/repos/bestwebua/homework-03-factory/forks","keys_url":"https://api.github.com/repos/bestwebua/homework-03-factory/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bestwebua/homework-03-factory/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bestwebua/homework-03-factory/teams","hooks_url":"https://api.github.com/repos/bestwebua/homework-03-factory/hooks","issue_events_url":"https://api.github.com/repos/bestwebua/homework-03-factory/issues/events{/number}","events_url":"https://api.github.com/repos/bestwebua/homework-03-factory/events","assignees_url":"https://api.github.com/repos/bestwebua/homework-03-factory/assignees{/user}","branches_url":"https://api.github.com/repos/bestwebua/homework-03-factory/branches{/branch}","tags_url":"https://api.github.com/repos/bestwebua/homework-03-factory/tags","blobs_url":"https://api.github.com/repos/bestwebua/homework-03-factory/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bestwebua/homework-03-factory/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bestwebua/homework-03-factory/git/refs{/sha}","trees_url":"https://api.github.com/repos/bestwebua/homework-03-factory/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bestwebua/homework-03-factory/statuses/{sha}","languages_url":"https://api.github.com/repos/bestwebua/homework-03-factory/languages","stargazers_url":"https://api.github.com/repos/bestwebua/homework-03-factory/stargazers","contributors_url":"https://api.github.com/repos/bestwebua/homework-03-factory/contributors","subscribers_url":"https://api.github.com/repos/bestwebua/homework-03-factory/subscribers","subscription_url":"https://api.github.com/repos/bestwebua/homework-03-factory/subscription","commits_url":"https://api.github.com/repos/bestwebua/homework-03-factory/commits{/sha}","git_commits_url":"https://api.github.com/repos/bestwebua/homework-03-factory/git/commits{/sha}","comments_url":"https://api.github.com/repos/bestwebua/homework-03-factory/comments{/number}","issue_comment_url":"https://api.github.com/repos/bestwebua/homework-03-factory/issues/comments{/number}","contents_url":"https://api.github.com/repos/bestwebua/homework-03-factory/contents/{+path}","compare_url":"https://api.github.com/repos/bestwebua/homework-03-factory/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bestwebua/homework-03-factory/merges","archive_url":"https://api.github.com/repos/bestwebua/homework-03-factory/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bestwebua/homework-03-factory/downloads","issues_url":"https://api.github.com/repos/bestwebua/homework-03-factory/issues{/number}","pulls_url":"https://api.github.com/repos/bestwebua/homework-03-factory/pulls{/number}","milestones_url":"https://api.github.com/repos/bestwebua/homework-03-factory/milestones{/number}","notifications_url":"https://api.github.com/repos/bestwebua/homework-03-factory/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bestwebua/homework-03-factory/labels{/name}","releases_url":"https://api.github.com/repos/bestwebua/homework-03-factory/releases{/id}","deployments_url":"https://api.github.com/repos/bestwebua/homework-03-factory/deployments","created_at":"2018-05-07T03:49:05Z","updated_at":"2018-05-25T04:54:03Z","pushed_at":"2018-05-25T04:54:03Z","git_url":"git://github.com/bestwebua/homework-03-factory.git","ssh_url":"git@github.com:bestwebua/homework-03-factory.git","clone_url":"https://github.com/bestwebua/homework-03-factory.git","svn_url":"https://github.com/bestwebua/homework-03-factory","homepage":null,"size":36,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":1,"watchers":0,"default_branch":"feature/base_version"}},"base":{"label":"bestwebua:develop","ref":"develop","sha":"824b97cc69339499aafcc0bd4a62d42a36243db0","user":{"login":"bestwebua","id":14002692,"node_id":"MDQ6VXNlcjE0MDAyNjky","avatar_url":"https://avatars2.githubusercontent.com/u/14002692?v=4","gravatar_id":"","url":"https://api.github.com/users/bestwebua","html_url":"https://github.com/bestwebua","followers_url":"https://api.github.com/users/bestwebua/followers","following_url":"https://api.github.com/users/bestwebua/following{/other_user}","gists_url":"https://api.github.com/users/bestwebua/gists{/gist_id}","starred_url":"https://api.github.com/users/bestwebua/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bestwebua/subscriptions","organizations_url":"https://api.github.com/users/bestwebua/orgs","repos_url":"https://api.github.com/users/bestwebua/repos","events_url":"https://api.github.com/users/bestwebua/events{/privacy}","received_events_url":"https://api.github.com/users/bestwebua/received_events","type":"User","site_admin":false},"repo":{"id":132404149,"node_id":"MDEwOlJlcG9zaXRvcnkxMzI0MDQxNDk=","name":"homework-03-factory","full_name":"bestwebua/homework-03-factory","owner":{"login":"bestwebua","id":14002692,"node_id":"MDQ6VXNlcjE0MDAyNjky","avatar_url":"https://avatars2.githubusercontent.com/u/14002692?v=4","gravatar_id":"","url":"https://api.github.com/users/bestwebua","html_url":"https://github.com/bestwebua","followers_url":"https://api.github.com/users/bestwebua/followers","following_url":"https://api.github.com/users/bestwebua/following{/other_user}","gists_url":"https://api.github.com/users/bestwebua/gists{/gist_id}","starred_url":"https://api.github.com/users/bestwebua/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bestwebua/subscriptions","organizations_url":"https://api.github.com/users/bestwebua/orgs","repos_url":"https://api.github.com/users/bestwebua/repos","events_url":"https://api.github.com/users/bestwebua/events{/privacy}","received_events_url":"https://api.github.com/users/bestwebua/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bestwebua/homework-03-factory","description":"Class with the same behavior like Struct.","fork":false,"url":"https://api.github.com/repos/bestwebua/homework-03-factory","forks_url":"https://api.github.com/repos/bestwebua/homework-03-factory/forks","keys_url":"https://api.github.com/repos/bestwebua/homework-03-factory/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bestwebua/homework-03-factory/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bestwebua/homework-03-factory/teams","hooks_url":"https://api.github.com/repos/bestwebua/homework-03-factory/hooks","issue_events_url":"https://api.github.com/repos/bestwebua/homework-03-factory/issues/events{/number}","events_url":"https://api.github.com/repos/bestwebua/homework-03-factory/events","assignees_url":"https://api.github.com/repos/bestwebua/homework-03-factory/assignees{/user}","branches_url":"https://api.github.com/repos/bestwebua/homework-03-factory/branches{/branch}","tags_url":"https://api.github.com/repos/bestwebua/homework-03-factory/tags","blobs_url":"https://api.github.com/repos/bestwebua/homework-03-factory/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bestwebua/homework-03-factory/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bestwebua/homework-03-factory/git/refs{/sha}","trees_url":"https://api.github.com/repos/bestwebua/homework-03-factory/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bestwebua/homework-03-factory/statuses/{sha}","languages_url":"https://api.github.com/repos/bestwebua/homework-03-factory/languages","stargazers_url":"https://api.github.com/repos/bestwebua/homework-03-factory/stargazers","contributors_url":"https://api.github.com/repos/bestwebua/homework-03-factory/contributors","subscribers_url":"https://api.github.com/repos/bestwebua/homework-03-factory/subscribers","subscription_url":"https://api.github.com/repos/bestwebua/homework-03-factory/subscription","commits_url":"https://api.github.com/repos/bestwebua/homework-03-factory/commits{/sha}","git_commits_url":"https://api.github.com/repos/bestwebua/homework-03-factory/git/commits{/sha}","comments_url":"https://api.github.com/repos/bestwebua/homework-03-factory/comments{/number}","issue_comment_url":"https://api.github.com/repos/bestwebua/homework-03-factory/issues/comments{/number}","contents_url":"https://api.github.com/repos/bestwebua/homework-03-factory/contents/{+path}","compare_url":"https://api.github.com/repos/bestwebua/homework-03-factory/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bestwebua/homework-03-factory/merges","archive_url":"https://api.github.com/repos/bestwebua/homework-03-factory/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bestwebua/homework-03-factory/downloads","issues_url":"https://api.github.com/repos/bestwebua/homework-03-factory/issues{/number}","pulls_url":"https://api.github.com/repos/bestwebua/homework-03-factory/pulls{/number}","milestones_url":"https://api.github.com/repos/bestwebua/homework-03-factory/milestones{/number}","notifications_url":"https://api.github.com/repos/bestwebua/homework-03-factory/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bestwebua/homework-03-factory/labels{/name}","releases_url":"https://api.github.com/repos/bestwebua/homework-03-factory/releases{/id}","deployments_url":"https://api.github.com/repos/bestwebua/homework-03-factory/deployments","created_at":"2018-05-07T03:49:05Z","updated_at":"2018-05-25T04:54:03Z","pushed_at":"2018-05-25T04:54:03Z","git_url":"git://github.com/bestwebua/homework-03-factory.git","ssh_url":"git@github.com:bestwebua/homework-03-factory.git","clone_url":"https://github.com/bestwebua/homework-03-factory.git","svn_url":"https://github.com/bestwebua/homework-03-factory","homepage":null,"size":36,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":1,"watchers":0,"default_branch":"feature/base_version"}},"_links":{"self":{"href":"https://api.github.com/repos/bestwebua/homework-03-factory/pulls/1"},"html":{"href":"https://github.com/bestwebua/homework-03-factory/pull/1"},"issue":{"href":"https://api.github.com/repos/bestwebua/homework-03-factory/issues/1"},"comments":{"href":"https://api.github.com/repos/bestwebua/homework-03-factory/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/bestwebua/homework-03-factory/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/bestwebua/homework-03-factory/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bestwebua/homework-03-factory/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/bestwebua/homework-03-factory/statuses/cdde09f812053f90709c93bf5f085f7c332ae2ff"}},"author_association":"OWNER"}}
{"actor":{"display_login":"bestwebua"}}