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
67 68 69 |
# File 'lib/httpx/plugins/cookies.rb', line 67 def initialize( = {}, &blk) super({ cookies: Store.new }.merge(), &blk) end |
#with_cookies(cookies) ⇒ Object
71 72 73 |
# File 'lib/httpx/plugins/cookies.rb', line 71 def () branch(.()) end |
#wrap ⇒ Object
75 76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/httpx/plugins/cookies.rb', line 75 def wrap return super unless block_given? super do |session| = @options..dup begin yield session ensure @options = @options.() end end end |