lib/httpx/chainable.rb in httpx-0.24.5 vs lib/httpx/chainable.rb in httpx-0.24.6
- old
+ new
@@ -46,21 +46,21 @@
def wrap(&blk)
branch(default_options).wrap(&blk)
end
def plugin(pl, options = nil, &blk)
- klass = is_a?(Session) ? self.class : Session
+ klass = is_a?(S) ? self.class : Session
klass = Class.new(klass)
klass.instance_variable_set(:@default_options, klass.default_options.merge(default_options))
klass.plugin(pl, options, &blk).new
end
# deprecated
# :nocov:
def plugins(pls)
warn ":#{__method__} is deprecated, use :plugin instead"
- klass = is_a?(Session) ? self.class : Session
+ klass = is_a?(S) ? self.class : Session
klass = Class.new(klass)
klass.instance_variable_set(:@default_options, klass.default_options.merge(default_options))
klass.plugins(pls).new
end
# :nocov:
@@ -80,10 +80,10 @@
def default_options
@options || Session.default_options
end
def branch(options, &blk)
- return self.class.new(options, &blk) if is_a?(Session)
+ return self.class.new(options, &blk) if is_a?(S)
Session.new(options, &blk)
end
def method_missing(meth, *args, **options)