Module: Mechanize::CookieJarIMethods
- Includes:
- CookieDeprecated
- Defined in:
- lib/mechanize/cookie_jar.rb
Instance Method Summary collapse
- #add(arg1, arg2 = nil) ⇒ Object
-
#add!(cookie) ⇒ Object
See HTTP::CookieJar#add.
-
#clear! ⇒ Object
See HTTP::CookieJar#clear.
-
#dump_cookiestxt(io) ⇒ Object
See HTTP::CookieJar#save.
-
#jar ⇒ Object
See HTTP::CookieJar#store.
-
#load_cookiestxt(io) ⇒ Object
See HTTP::CookieJar#load.
-
#save_as(filename, *options) ⇒ Object
See HTTP::CookieJar#save.
Instance Method Details
#add(arg1, arg2 = nil) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/mechanize/cookie_jar.rb', line 12 def add(arg1, arg2 = nil) if arg2 __deprecated__ 'add and origin=' super arg2.dup.tap { || begin .origin = arg1 rescue return nil end } else super arg1 end end |
#add!(cookie) ⇒ Object
See HTTP::CookieJar#add.
28 29 30 31 32 33 |
# File 'lib/mechanize/cookie_jar.rb', line 28 def add!() __deprecated__ :add .domain.nil? and raise NoMethodError, 'raised for compatibility' @store.add() self end |
#clear! ⇒ Object
See HTTP::CookieJar#clear.
42 43 44 45 |
# File 'lib/mechanize/cookie_jar.rb', line 42 def clear! __deprecated__ :clear clear end |
#dump_cookiestxt(io) ⇒ Object
See HTTP::CookieJar#save.
60 61 62 63 |
# File 'lib/mechanize/cookie_jar.rb', line 60 def (io) __deprecated__ :save save(io, :cookiestxt) end |
#jar ⇒ Object
See HTTP::CookieJar#store.
48 49 50 51 |
# File 'lib/mechanize/cookie_jar.rb', line 48 def jar __deprecated__ :store @store.instance_variable_get(:@jar) end |
#load_cookiestxt(io) ⇒ Object
See HTTP::CookieJar#load.
54 55 56 57 |
# File 'lib/mechanize/cookie_jar.rb', line 54 def (io) __deprecated__ :load load(io, :cookiestxt) end |
#save_as(filename, *options) ⇒ Object
See HTTP::CookieJar#save.
36 37 38 39 |
# File 'lib/mechanize/cookie_jar.rb', line 36 def save_as(filename, *) __deprecated__ :save save(filename, *) end |