Class: Couchbase::Options::Increment
- Inherits:
-
Base
- Object
- Base
- Couchbase::Options::Increment
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(delta: 1, initial: nil, expiry: nil, durability_level: :none, timeout: nil, retry_strategy: nil, client_context: nil, parent_span: nil) {|self| ... } ⇒ Increment
[View source]
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
|
# File 'lib/couchbase/options.rb', line 891
def initialize(delta: 1,
initial: nil,
expiry: nil,
durability_level: :none,
timeout: nil,
retry_strategy: nil,
client_context: nil,
parent_span: nil)
raise ArgumentError, "the delta cannot be less than 0" if delta.negative?
super(timeout: timeout, retry_strategy: retry_strategy, client_context: client_context, parent_span: parent_span)
@delta = delta
@initial = initial
@expiry = Utils::Time.(expiry)
@durability_level = durability_level
yield self if block_given?
end
|
Instance Attribute Details
#delta ⇒ Integer
861
862
863
|
# File 'lib/couchbase/options.rb', line 861
def delta
@delta
end
|
#durability_level ⇒ Symbol
864
865
866
|
# File 'lib/couchbase/options.rb', line 864
def durability_level
@durability_level
end
|
#expiry ⇒ Integer, #in_seconds
863
864
865
|
# File 'lib/couchbase/options.rb', line 863
def expiry
@expiry
end
|
#initial ⇒ Integer
862
863
864
|
# File 'lib/couchbase/options.rb', line 862
def initial
@initial
end
|