Exception: IJSRails::ScriptNotFound

Inherits:
BaseError
  • Object
show all
Defined in:
lib/ijs-rails/errors/script_not_found.rb

Overview

Raised when attempting to use an inline script that can’t be found.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(script) ⇒ ScriptNotFound

Create a new instance of this error.

Parameters:

  • script (String)

    The name of the script.



15
16
17
# File 'lib/ijs-rails/errors/script_not_found.rb', line 15

def initialize(script)
  @script = script
end

Instance Attribute Details

#scriptString (readonly)

Returns The name of the script.

Returns:

  • (String)

    The name of the script.



9
10
11
# File 'lib/ijs-rails/errors/script_not_found.rb', line 9

def script
  @script
end

Instance Method Details

#to_sString

Returns The error message.

Returns:

  • (String)

    The error message.



21
22
23
# File 'lib/ijs-rails/errors/script_not_found.rb', line 21

def to_s
  "The inline script '#{script}' could not be found."
end