Class: Couchbase::Options::Replace
- Inherits:
-
Base
- Object
- Base
- Couchbase::Options::Replace
show all
- Defined in:
- lib/couchbase/options.rb,
/Users/sergey.auseyau/code/couchbase-ruby-client/lib/couchbase/options.rb more...
Overview
Instance Attribute Summary collapse
Attributes inherited from Base
#client_context, #parent_span, #retry_strategy, #timeout
Instance Method Summary
collapse
Constructor Details
#initialize(expiry: nil, transcoder: JsonTranscoder.new, cas: nil, durability_level: :none, timeout: nil, retry_strategy: nil, client_context: nil, parent_span: nil) {|| ... } ⇒ Replace
[View source]
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
|
# File 'lib/couchbase/options.rb', line 641
def initialize(expiry: nil,
transcoder: JsonTranscoder.new,
cas: nil,
durability_level: :none,
timeout: nil,
retry_strategy: nil,
client_context: nil,
parent_span: nil)
super(timeout: timeout, retry_strategy: retry_strategy, client_context: client_context, parent_span: parent_span)
@expiry = expiry
@transcoder = transcoder
@cas = cas
@durability_level = durability_level
yield self if block_given?
end
|
Instance Attribute Details
#cas ⇒ Integer?
613
614
615
|
# File 'lib/couchbase/options.rb', line 613
def cas
@cas
end
|
#durability_level ⇒ Symbol
614
615
616
|
# File 'lib/couchbase/options.rb', line 614
def durability_level
@durability_level
end
|
#expiry ⇒ Integer, ...
611
612
613
|
# File 'lib/couchbase/options.rb', line 611
def expiry
@expiry
end
|
#transcoder ⇒ JsonTranscoder, #encode(Object)
612
613
614
|
# File 'lib/couchbase/options.rb', line 612
def transcoder
@transcoder
end
|
Instance Method Details
#to_backend ⇒ Object
[View source]
657
658
659
660
661
662
663
664
|
# File 'lib/couchbase/options.rb', line 657
def to_backend
{
timeout: @timeout.respond_to?(:in_milliseconds) ? @timeout.public_send(:in_milliseconds) : @timeout,
expiry: @expiry.respond_to?(:in_seconds) ? @expiry.public_send(:in_seconds) : @expiry,
durability_level: @durability_level,
cas: @cas,
}
end
|