Module: Octogate::Event
- Defined in:
- lib/octogate/events.rb
Defined Under Namespace
Classes: Base, Issue, IssueComment, PullRequest, PullRequestReviewComment, Push
Class Method Summary
collapse
Class Method Details
.get(name) ⇒ Object
10
11
12
13
14
|
# File 'lib/octogate/events.rb', line 10
def get(name)
@events.fetch(name) do
raise NotRegisteredEvent.new(name)
end
end
|
.register_event(name, klass) ⇒ Object
5
6
7
8
|
# File 'lib/octogate/events.rb', line 5
def register_event(name, klass)
@events ||= {}.with_indifferent_access
@events[name] = klass
end
|