Class: Puppeteer::ConsoleMessage

Inherits:
Object
  • Object
show all
Defined in:
lib/puppeteer/console_message.rb

Defined Under Namespace

Classes: Location

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(log_type, text, args, stack_trace_locations) ⇒ ConsoleMessage

Returns a new instance of ConsoleMessage.

Parameters:



16
17
18
19
20
21
# File 'lib/puppeteer/console_message.rb', line 16

def initialize(log_type, text, args, stack_trace_locations)
  @log_type = log_type
  @text = text
  @args = args
  @stack_trace_locations = stack_trace_locations
end

Instance Attribute Details

#argsObject (readonly)

Returns the value of attribute args.



23
24
25
# File 'lib/puppeteer/console_message.rb', line 23

def args
  @args
end

#log_typeObject (readonly)

Returns the value of attribute log_type.



23
24
25
# File 'lib/puppeteer/console_message.rb', line 23

def log_type
  @log_type
end

#textObject (readonly)

Returns the value of attribute text.



23
24
25
# File 'lib/puppeteer/console_message.rb', line 23

def text
  @text
end

Instance Method Details

#locationLocation

Returns:



26
27
28
# File 'lib/puppeteer/console_message.rb', line 26

def location
  @stack_trace_locations.first
end

#stack_traceArray<Location>

Returns:



31
32
33
# File 'lib/puppeteer/console_message.rb', line 31

def stack_trace
  @stack_trace_locations
end