Exception: Colorly::ScriptError
- Defined in:
- lib/colorly/exceptions.rb
Instance Attribute Summary collapse
-
#error ⇒ Object
readonly
Returns the value of attribute error.
Instance Method Summary collapse
-
#initialize(error) ⇒ ScriptError
constructor
A new instance of ScriptError.
Constructor Details
#initialize(error) ⇒ ScriptError
Returns a new instance of ScriptError.
10 11 12 13 14 15 |
# File 'lib/colorly/exceptions.rb', line 10 def initialize(error) @error = error trace = error.backtrace_locations.first = error..gsub(/ for #<Colorly::Script.*>/, '') super "#{trace.path}:#{trace.lineno}: #{}" end |
Instance Attribute Details
#error ⇒ Object (readonly)
Returns the value of attribute error.
8 9 10 |
# File 'lib/colorly/exceptions.rb', line 8 def error @error end |