Sha256: 034ffbc828a0fdc6fbab22e43ac8801958a6fe51005b568ab11a238cdd764c9b
Contents?: true
Size: 371 Bytes
Versions: 1
Compression:
Stored size: 371 Bytes
Contents
module Mountapi module Handler class Registry def initialize @handlers = {} end def register(operation_id, handler) @handlers[operation_id] = handler end def [](operation_id) @handlers.fetch(operation_id) rescue KeyError raise Error::HandlerMissing.new(operation_id) end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
mountapi-0.11.1 | lib/mountapi/handler/registry.rb |