Exception: RunJS::JavaScriptError
- Defined in:
- lib/runjs/error.rb
Instance Attribute Summary collapse
-
#error ⇒ Object
readonly
Returns the value of attribute error.
-
#source ⇒ Object
readonly
Returns the value of attribute source.
Instance Method Summary collapse
- #[](key) ⇒ Object
-
#initialize(error, source) ⇒ JavaScriptError
constructor
A new instance of JavaScriptError.
Constructor Details
#initialize(error, source) ⇒ JavaScriptError
Returns a new instance of JavaScriptError.
22 23 24 25 26 |
# File 'lib/runjs/error.rb', line 22 def initialize(error, source) @error = error @source = source super() end |
Instance Attribute Details
#error ⇒ Object (readonly)
Returns the value of attribute error.
19 20 21 |
# File 'lib/runjs/error.rb', line 19 def error @error end |
#source ⇒ Object (readonly)
Returns the value of attribute source.
20 21 22 |
# File 'lib/runjs/error.rb', line 20 def source @source end |
Instance Method Details
#[](key) ⇒ Object
28 29 30 31 32 |
# File 'lib/runjs/error.rb', line 28 def [](key) @error[key].nil? ? @error[key.to_s] : @error[key] rescue nil end |