Class: TestyCookie::Proxy
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- TestyCookie::Proxy
- Defined in:
- lib/testy_cookie/proxy.rb
Overview
Proxy for propagating cookie changes to ‘Rack::Test::CookieJar`
Instance Method Summary collapse
- #[]=(key, value) ⇒ Object
-
#encrypted ⇒ Proxy
Proxy to the encrypted cookie jar.
-
#initialize(cookies, raw_cookies, parent) ⇒ Proxy
constructor
A new instance of Proxy.
-
#permanent ⇒ Proxy
Proxy to the permanent cookie jar.
-
#signed ⇒ Proxy
Proxy the signed cookie jar.
Constructor Details
#initialize(cookies, raw_cookies, parent) ⇒ Proxy
Returns a new instance of Proxy.
7 8 9 10 11 |
# File 'lib/testy_cookie/proxy.rb', line 7 def initialize(, , parent) super() @parent = parent @raw_cookies = end |
Instance Method Details
#[]=(key, value) ⇒ Object
15 16 17 18 |
# File 'lib/testy_cookie/proxy.rb', line 15 def []=(key, value) super assign(key) end |
#encrypted ⇒ Proxy
Returns proxy to the encrypted cookie jar.
21 22 23 |
# File 'lib/testy_cookie/proxy.rb', line 21 def encrypted self.class.new(__getobj__.encrypted, @raw_cookies, self) end |
#permanent ⇒ Proxy
Returns proxy to the permanent cookie jar.
26 27 28 |
# File 'lib/testy_cookie/proxy.rb', line 26 def permanent self.class.new(__getobj__.permanent, @raw_cookies, self) end |
#signed ⇒ Proxy
Returns proxy the signed cookie jar.
31 32 33 |
# File 'lib/testy_cookie/proxy.rb', line 31 def signed self.class.new(__getobj__.signed, @raw_cookies, self) end |