Class: Esearch::Command::Exist

Inherits:
Esearch::Command show all
Defined in:
lib/esearch/command/exist.rb

Overview

Command to check existance of objects

Constant Summary collapse

EXPECTED_STATI =
[200, 404].freeze

Constants inherited from Esearch::Command

JSON_CONTENT_TYPE

Instance Method Summary collapse

Methods inherited from Esearch::Command

run

Instance Method Details

#resulttrue, false

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Return result

Returns:

  • (true)

    if object exists

  • (false)

    otherwise



20
21
22
23
# File 'lib/esearch/command/exist.rb', line 20

def result
  assert_success
  response.status == 200
end