Skip to content

Instantly share code, notes, and snippets.

@shkrt
Created September 21, 2017 10:18
Show Gist options
  • Save shkrt/f505801c17fdef061df8da898259d591 to your computer and use it in GitHub Desktop.
Save shkrt/f505801c17fdef061df8da898259d591 to your computer and use it in GitHub Desktop.
def match_host(issue_url)
Matchers::GitHost.(issue_url) do |m|
m.success(:github) { |issue_data| Services::GithubIssueRequester.(issue_data) }
m.success(:gitlab) { |issue_data| Services::GitlabIssueRequester.(issue_data) }
m.failure do
error('invalid url')
INVALID_URL_ERROR
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment