Class: Couchbase::Collection::ExistsResult
- Inherits:
-
Object
- Object
- Couchbase::Collection::ExistsResult
- Defined in:
- lib/couchbase/collection_options.rb,
/Users/sergey.auseyau/code/couchbase-ruby-client/lib/couchbase/collection_options.rb more...
Instance Attribute Summary collapse
-
#cas ⇒ Integer
Holds the CAS value of the fetched document.
-
#deleted ⇒ Boolean
True if the document was deleted.
-
#exists ⇒ Boolean
(also: #exists?)
True if the document exists.
-
#expiry ⇒ Integer
writeonly
The expiration if fetched and present.
Instance Method Summary collapse
-
#expiry_time ⇒ Time
Time when the document will expire.
-
#initialize {|| ... } ⇒ ExistsResult
constructor
A new instance of ExistsResult.
Constructor Details
#initialize {|| ... } ⇒ ExistsResult
Returns a new instance of ExistsResult.
98 99 100 |
# File 'lib/couchbase/collection_options.rb', line 98 def initialize yield self if block_given? end |
Instance Attribute Details
#cas ⇒ Integer
Returns holds the CAS value of the fetched document.
88 89 90 |
# File 'lib/couchbase/collection_options.rb', line 88 def cas @cas end |
#deleted ⇒ Boolean
Returns true if the document was deleted.
91 92 93 |
# File 'lib/couchbase/collection_options.rb', line 91 def deleted @deleted end |
#exists ⇒ Boolean Also known as: exists?
Returns true if the document exists.
94 95 96 |
# File 'lib/couchbase/collection_options.rb', line 94 def exists @exists end |
#expiry=(value) ⇒ Integer (writeonly)
Returns the expiration if fetched and present.
103 104 105 |
# File 'lib/couchbase/collection_options.rb', line 103 def expiry=(value) @expiry = value end |
Instance Method Details
#expiry_time ⇒ Time
Returns time when the document will expire.
106 107 108 |
# File 'lib/couchbase/collection_options.rb', line 106 def expiry_time Time.at(@expiry) if @expiry end |