Skip to content

Commit

Permalink
feat: remove fields that can not be resolved in inspect
Browse files Browse the repository at this point in the history
  • Loading branch information
marcosgz committed Jul 19, 2024
1 parent 4d4e9b8 commit 7d8fef8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/esse/document.rb
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,10 @@ def doc_header
def inspect
attributes = %i[id routing source].map do |attr|
value = send(attr)
"#{attr}: #{value.inspect}" if value
next unless value
"#{attr}: #{value.inspect}"
rescue
nil
end.compact.join(', ')
attributes << " mutations: #{@__mutations__.inspect}" if @__mutations__
"#<#{self.class.name || 'Esse::Document'} #{attributes}>"
Expand Down

0 comments on commit 7d8fef8

Please sign in to comment.