Class: EventMachine::Protocols::Couchbase::Result
- Inherits:
-
Object
- Object
- EventMachine::Protocols::Couchbase::Result
- Defined in:
- lib/em-couchbase/result.rb
Instance Attribute Summary collapse
-
#cas ⇒ Object
Returns the value of attribute cas.
-
#error ⇒ Object
Returns the value of attribute error.
-
#flags ⇒ Object
Returns the value of attribute flags.
-
#key ⇒ Object
Returns the value of attribute key.
-
#node ⇒ Object
Returns the value of attribute node.
-
#operation ⇒ Object
Returns the value of attribute operation.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ Result
constructor
A new instance of Result.
- #success? ⇒ Boolean
Constructor Details
#initialize(attributes = {}) ⇒ Result
Returns a new instance of Result.
32 33 34 35 36 37 38 |
# File 'lib/em-couchbase/result.rb', line 32 def initialize(attributes = {}) attributes.each do |k, v| if respond_to?(k) instance_variable_set("@#{k}", v) end end end |
Instance Attribute Details
#cas ⇒ Object
Returns the value of attribute cas.
24 25 26 |
# File 'lib/em-couchbase/result.rb', line 24 def cas @cas end |
#error ⇒ Object
Returns the value of attribute error.
25 26 27 |
# File 'lib/em-couchbase/result.rb', line 25 def error @error end |
#flags ⇒ Object
Returns the value of attribute flags.
26 27 28 |
# File 'lib/em-couchbase/result.rb', line 26 def flags @flags end |
#key ⇒ Object
Returns the value of attribute key.
27 28 29 |
# File 'lib/em-couchbase/result.rb', line 27 def key @key end |
#node ⇒ Object
Returns the value of attribute node.
28 29 30 |
# File 'lib/em-couchbase/result.rb', line 28 def node @node end |
#operation ⇒ Object
Returns the value of attribute operation.
29 30 31 |
# File 'lib/em-couchbase/result.rb', line 29 def operation @operation end |
#value ⇒ Object
Returns the value of attribute value.
30 31 32 |
# File 'lib/em-couchbase/result.rb', line 30 def value @value end |
Instance Method Details
#success? ⇒ Boolean
40 41 42 |
# File 'lib/em-couchbase/result.rb', line 40 def success? !@error end |