lib/puppeteer/js_handle.rb in puppeteer-ruby-0.39.0 vs lib/puppeteer/js_handle.rb in puppeteer-ruby-0.40.0
- old
+ new
@@ -34,9 +34,17 @@
@disposed = false
end
attr_reader :context, :remote_object
+ def inspect
+ values = %i[context remote_object disposed].map do |sym|
+ value = instance_variable_get(:"@#{sym}")
+ "@#{sym}=#{value}"
+ end
+ "#<Puppeteer::JSHandle #{values.join(' ')}>"
+ end
+
# @return [Puppeteer::ExecutionContext]
def execution_context
@context
end