Sha256: 6dc48711a3c1cf0346e90d31fce9ae2a9e0c0a82df2da9193b5891b27b7dd3c1
Contents?: true
Size: 470 Bytes
Versions: 1
Compression:
Stored size: 470 Bytes
Contents
require "active_support/core_ext/hash" module Octogate module Event class << self def register_event(name, klass) @events ||= {}.with_indifferent_access @events[name] = klass end def get(name) @events.fetch(name) do raise NotRegisteredEvent.new(name) end end end end class NotRegisteredEvent < StandardError; end end require "octogate/events/push" require "octogate/events/pull_request"
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
octogate-0.2.1 | lib/octogate/events.rb |