lib/httpx/chainable.rb in httpx-0.2.1 vs lib/httpx/chainable.rb in httpx-0.3.0

- old
+ new

@@ -22,9 +22,13 @@ def accept(type) headers("accept" => String(type)) end + def wrap(&blk) + branch(default_options).wrap(&blk) + end + def plugin(*plugins) klass = is_a?(Client) ? self.class : Client klass = Class.new(klass) klass.instance_variable_set(:@default_options, klass.default_options.merge(default_options)) klass.plugins(plugins).new