mirror of
https://github.com/HoneyryderChuck/httpx.git
synced 2025-10-05 00:02:38 -04:00
registry: passing along registers to subclasses
This commit is contained in:
parent
6d7c3d73b6
commit
f375a9bbb9
@ -46,6 +46,11 @@ module HTTPX
|
||||
|
||||
# Class Methods
|
||||
module ClassMethods
|
||||
def inherited(klass)
|
||||
super
|
||||
klass.instance_variable_set(:@registry, @registry.dup)
|
||||
end
|
||||
|
||||
# @param [Object] tag the handler identifier in the registry
|
||||
# @return [Symbol, String, Object] the corresponding handler (if Symbol or String,
|
||||
# will assume it referes to an autoloaded module, and will load-and-return it).
|
||||
|
Loading…
x
Reference in New Issue
Block a user