mirror of
https://github.com/HoneyryderChuck/httpx.git
synced 2025-08-10 00:01:27 -04:00
copying plugins to inherited classes; set a default options also for the main module
This commit is contained in:
parent
e09c1cbb2f
commit
34d6f3b8c0
@ -60,6 +60,10 @@ module HTTPX
|
||||
|
||||
private
|
||||
|
||||
def default_options
|
||||
@default_options || Options.new
|
||||
end
|
||||
|
||||
# :nodoc:
|
||||
def branch(options)
|
||||
Client.new(options)
|
||||
|
@ -79,6 +79,7 @@ module HTTPX
|
||||
def inherited(klass)
|
||||
super
|
||||
klass.instance_variable_set(:@default_options, @default_options.dup)
|
||||
klass.instance_variable_set(:@plugins, @plugins.dup)
|
||||
end
|
||||
|
||||
def plugin(pl, *args, &block)
|
||||
|
Loading…
x
Reference in New Issue
Block a user