Class: Capybara::Poltergeist::JSErrorItem

Inherits:
Object
  • Object
show all
Defined in:
lib/capybara/poltergeist/errors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, stack) ⇒ JSErrorItem

Returns a new instance of JSErrorItem.



19
20
21
22
# File 'lib/capybara/poltergeist/errors.rb', line 19

def initialize(message, stack)
  @message = message
  @stack   = stack
end

Instance Attribute Details

#messageObject (readonly)

Returns the value of attribute message.



17
18
19
# File 'lib/capybara/poltergeist/errors.rb', line 17

def message
  @message
end

#stackObject (readonly)

Returns the value of attribute stack.



17
18
19
# File 'lib/capybara/poltergeist/errors.rb', line 17

def stack
  @stack
end

Instance Method Details

#to_sObject



24
25
26
# File 'lib/capybara/poltergeist/errors.rb', line 24

def to_s
  [message, stack].join("\n")
end