Skip to content

Commit 723e432

Browse files
committed
[STORE] Add #inspect method for Repository
1 parent 0277341 commit 723e432

File tree

1 file changed

+12
-0
lines changed
  • elasticsearch-persistence/lib/elasticsearch/persistence

1 file changed

+12
-0
lines changed

elasticsearch-persistence/lib/elasticsearch/persistence/repository.rb

+12
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,18 @@ def index_exists?(*args)
214214
super(index_name: index_name)
215215
end
216216

217+
# Get the nicer formatted string for use in inspection.
218+
#
219+
# @example Inspect the repository.
220+
# repository.inspect
221+
#
222+
# @return [ String ] The repository inspection.
223+
#
224+
# @since 6.0.0
225+
def inspect
226+
"#<#{self.class}:0x#{object_id} index_name=#{index_name} document_type=#{document_type} klass=#{klass}>"
227+
end
228+
217229
private
218230

219231
def __get_class_value(_method_)

0 commit comments

Comments
 (0)