lib/puppeteer/console_message.rb in puppeteer-ruby-0.40.3 vs lib/puppeteer/console_message.rb in puppeteer-ruby-0.40.4

- old
+ new

@@ -10,15 +10,25 @@ end # @param log_type [String] # @param text [String] # @param args [Array<Puppeteer::JSHandle>] - # @param location [Location] - def initialize(log_type, text, args, location) + # @param stack_trace_locations [Array<Location>] + def initialize(log_type, text, args, stack_trace_locations) @log_type = log_type @text = text @args = args - @location = location + @stack_trace_locations = stack_trace_locations end - attr_reader :log_type, :text, :args, :location + attr_reader :log_type, :text, :args + + # @return [Location] + def location + @stack_trace_locations.first + end + + # @return [Array<Location>] + def stack_trace + @stack_trace_locations + end end