{"action":"closed","issue":{"url":"https://api.github.com/repos/anjlab/triggerable/issues/6","labels_url":"https://api.github.com/repos/anjlab/triggerable/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/anjlab/triggerable/issues/6/comments","events_url":"https://api.github.com/repos/anjlab/triggerable/issues/6/events","html_url":"https://github.com/anjlab/triggerable/issues/6","id":54434271,"number":6,"title":"Is it possible to use validation in separate class instead of `if` key?","user":{"login":"simonoff","id":14304,"avatar_url":"https://avatars.githubusercontent.com/u/14304?v=3","gravatar_id":"","url":"https://api.github.com/users/simonoff","html_url":"https://github.com/simonoff","followers_url":"https://api.github.com/users/simonoff/followers","following_url":"https://api.github.com/users/simonoff/following{/other_user}","gists_url":"https://api.github.com/users/simonoff/gists{/gist_id}","starred_url":"https://api.github.com/users/simonoff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simonoff/subscriptions","organizations_url":"https://api.github.com/users/simonoff/orgs","repos_url":"https://api.github.com/users/simonoff/repos","events_url":"https://api.github.com/users/simonoff/events{/privacy}","received_events_url":"https://api.github.com/users/simonoff/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-01-15T10:37:06Z","updated_at":"2015-11-20T06:55:32Z","closed_at":"2015-11-20T06:55:32Z","body":"Like instead of:\r\n```rb\r\ntrigger on: :after_create, if: { or: [{ field1: '1' }, { field2: 1 }] }, ... , do: :whatever\r\n```\r\nto have something like this:\r\n```rb\r\nclass Whatever < Triggerable::Actions::Action\r\n  def guard(object, trigger_name)\r\n     # Some checks\r\n  end\r\nend\r\n```"}}