{"action":"closed","issue":{"url":"https://api.github.com/repos/ignat-z/ducalis/issues/145","repository_url":"https://api.github.com/repos/ignat-z/ducalis","labels_url":"https://api.github.com/repos/ignat-z/ducalis/issues/145/labels{/name}","comments_url":"https://api.github.com/repos/ignat-z/ducalis/issues/145/comments","events_url":"https://api.github.com/repos/ignat-z/ducalis/issues/145/events","html_url":"https://github.com/ignat-z/ducalis/issues/145","id":385659990,"node_id":"MDU6SXNzdWUzODU2NTk5OTA=","number":145,"title":"Refactor time-related cop","user":{"login":"ignat-z","id":2878349,"node_id":"MDQ6VXNlcjI4NzgzNDk=","avatar_url":"https://avatars0.githubusercontent.com/u/2878349?v=4","gravatar_id":"","url":"https://api.github.com/users/ignat-z","html_url":"https://github.com/ignat-z","followers_url":"https://api.github.com/users/ignat-z/followers","following_url":"https://api.github.com/users/ignat-z/following{/other_user}","gists_url":"https://api.github.com/users/ignat-z/gists{/gist_id}","starred_url":"https://api.github.com/users/ignat-z/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ignat-z/subscriptions","organizations_url":"https://api.github.com/users/ignat-z/orgs","repos_url":"https://api.github.com/users/ignat-z/repos","events_url":"https://api.github.com/users/ignat-z/events{/privacy}","received_events_url":"https://api.github.com/users/ignat-z/received_events","type":"User","site_admin":false},"labels":[{"id":638148518,"node_id":"MDU6TGFiZWw2MzgxNDg1MTg=","url":"https://api.github.com/repos/ignat-z/ducalis/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-11-29T10:10:48Z","updated_at":"2018-12-02T06:38:14Z","closed_at":"2018-12-02T06:38:14Z","author_association":"OWNER","body":"```diff\r\ndiff --git a/lib/ducalis/cops/multiple_times.rb b/lib/ducalis/cops/multiple_times.rb\r\nindex 7be629c..4583fac 100644\r\n--- a/lib/ducalis/cops/multiple_times.rb\r\n+++ b/lib/ducalis/cops/multiple_times.rb\r\n@@ -29,8 +29,8 @@ module Ducalis\r\n\r\n     def on_def(body)\r\n       multiple = [\r\n-        date_today(body), date_current(body), date_yesterday(body),\r\n-        time_current(body), time_now(body)\r\n+        date_methods(body),\r\n+        time_methods(body)\r\n       ].map(&:to_a).compact.flatten.to_a\r\n       return if multiple.count < 2\r\n       multiple.each do |time_node|\r\n@@ -40,10 +40,9 @@ module Ducalis\r\n     alias on_defs on_def\r\n     alias on_send on_def\r\n\r\n-    def_node_search :date_today, '(send (const _ :Date) :today)'\r\n-    def_node_search :date_current, '(send (const _ :Date) :current)'\r\n-    def_node_search :date_yesterday, '(send (const _ :Date) :yesterday)'\r\n-    def_node_search :time_current, '(send (const _ :Time) :current)'\r\n-    def_node_search :time_now, '(send (const _ :Time) :now)'\r\n+    def_node_search :date_methods,\r\n+                    '(send (const _ :Date) {:today :current :yesterday})'\r\n+    def_node_search :time_methods,\r\n+                    '(send (const _ :Time) {:current :now})'\r\n   end\r\n end\r\n```\r\n\r\nI'm so lazy :("}}
{"actor":{"display_login":"ignat-z"}}