Class: Ezid::Session Private
- Inherits:
-
Object
- Object
- Ezid::Session
- Defined in:
- lib/ezid/session.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
An EZID session
Instance Attribute Summary collapse
- #cookie ⇒ Object readonly private
Instance Method Summary collapse
- #close ⇒ Object private
- #closed? ⇒ Boolean private
-
#initialize(response = nil) ⇒ Session
constructor
private
A new instance of Session.
- #inspect ⇒ Object private
- #open(cookie) ⇒ Object private
- #open? ⇒ Boolean private
Constructor Details
#initialize(response = nil) ⇒ Session
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Session.
10 11 12 |
# File 'lib/ezid/session.rb', line 10 def initialize(response=nil) open(response) if response end |
Instance Attribute Details
#cookie ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
8 9 10 |
# File 'lib/ezid/session.rb', line 8 def @cookie end |
Instance Method Details
#close ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
22 23 24 |
# File 'lib/ezid/session.rb', line 22 def close @cookie = nil end |
#closed? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
26 27 28 |
# File 'lib/ezid/session.rb', line 26 def closed? .nil? end |
#inspect ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
14 15 16 |
# File 'lib/ezid/session.rb', line 14 def inspect super.sub(/@cookie="[^\"]+"/, "OPEN") end |
#open(cookie) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
18 19 20 |
# File 'lib/ezid/session.rb', line 18 def open() @cookie = end |
#open? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
30 31 32 |
# File 'lib/ezid/session.rb', line 30 def open? !closed? end |