Module: HTTPX::Plugins::Cookies::InstanceMethods
- Extended by:
- Forwardable
- Defined in:
- lib/httpx/plugins/cookies.rb
Instance Method Summary collapse
Instance Method Details
#initialize(options = {}, &blk) ⇒ Object
32 33 34 |
# File 'lib/httpx/plugins/cookies.rb', line 32 def initialize( = {}, &blk) super({ cookies: Jar.new }.merge(), &blk) end |
#wrap ⇒ Object
36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/httpx/plugins/cookies.rb', line 36 def wrap return super unless block_given? super do |session| = ..dup begin yield session ensure = .merge(cookies: ) end end end |