Class: Capybara::Webkit::JsonError
- Inherits:
-
Object
- Object
- Capybara::Webkit::JsonError
- Defined in:
- lib/capybara/webkit/errors.rb
Instance Method Summary collapse
- #exception ⇒ Object
-
#initialize(response) ⇒ JsonError
constructor
A new instance of JsonError.
Constructor Details
#initialize(response) ⇒ JsonError
Returns a new instance of JsonError.
30 31 32 33 34 35 |
# File 'lib/capybara/webkit/errors.rb', line 30 def initialize(response) error = JSON.parse response @class_name = error['class'] @message = error['message'] end |
Instance Method Details
#exception ⇒ Object
37 38 39 |
# File 'lib/capybara/webkit/errors.rb', line 37 def exception error_class.new @message end |