Skip to content

Commit 36018fd

Browse files
committed
Follow Ruby standards for return boolean
Follow Ruby standards when returning a boolean value. This means using question marks in method names which return either true or false.
1 parent 8f9f6a7 commit 36018fd

File tree

1 file changed

+2
-2
lines changed
  • elasticsearch-api/lib/elasticsearch/api/actions/indices

1 file changed

+2
-2
lines changed

elasticsearch-api/lib/elasticsearch/api/actions/indices/exists.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ module Actions
77
#
88
# @example Check whether index named _myindex_ exists
99
#
10-
# client.indices.exists index: 'myindex'
10+
# client.indices.exists? index: 'myindex'
1111
#
1212
# @option arguments [List] :index A comma-separated list of indices to check (*Required*)
1313
# @option arguments [Boolean] :allow_no_indices Whether to ignore if a wildcard indices expression resolves into
@@ -26,7 +26,7 @@ module Actions
2626
#
2727
# @see http://www.elasticsearch.org/guide/reference/api/admin-indices-indices-exists/
2828
#
29-
def exists(arguments={})
29+
def exists?(arguments={})
3030
raise ArgumentError, "Required argument 'index' missing" unless arguments[:index]
3131

3232
valid_params = [

0 commit comments

Comments
 (0)