Class: Tair::DelResponse

Inherits:
Response show all
Defined in:
lib/tair/operation/delete.rb

Defined Under Namespace

Classes: Body

Constant Summary collapse

NON_EXIST_ERR_CODE =
-3998

Instance Attribute Summary

Attributes inherited from Response

#body, #raw_text

Instance Method Summary collapse

Methods inherited from Response

#initialize

Constructor Details

This class inherits a constructor from Tair::Response

Instance Method Details

#decodeObject



32
33
34
35
36
37
# File 'lib/tair/operation/delete.rb', line 32

def decode
  return if defined? @success
  Body.read(@body).tap do |body|
    @success = [0, NON_EXIST_ERR_CODE].include?(body.code)
  end
end

#success?Boolean

Returns:

  • (Boolean)


26
27
28
29
# File 'lib/tair/operation/delete.rb', line 26

def success?
  decode
  @success
end