Exception: Synthra::Errors::MissingFunctionError
- Inherits:
-
GenerationError
- Object
- StandardError
- Error
- GenerationError
- Synthra::Errors::MissingFunctionError
- Defined in:
- lib/synthra/errors.rb
Overview
Custom function not registered
Raised when a custom() type references a function that hasn't been registered with Synthra.register_function.
Constant Summary collapse
- ERROR_CODE =
"MISSING_FUNCTION_ERROR"
Instance Attribute Summary collapse
-
#function_name ⇒ Symbol
readonly
The function name that wasn't found.
Instance Method Summary collapse
-
#initialize(function_name) ⇒ MissingFunctionError
constructor
Create a new MissingFunctionError.
Constructor Details
#initialize(function_name) ⇒ MissingFunctionError
Create a new MissingFunctionError
747 748 749 750 |
# File 'lib/synthra/errors.rb', line 747 def initialize(function_name) @function_name = function_name super("Custom function not registered: #{function_name}") end |
Instance Attribute Details
#function_name ⇒ Symbol (readonly)
Returns the function name that wasn't found.
737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 |
# File 'lib/synthra/errors.rb', line 737 class MissingFunctionError < GenerationError ERROR_CODE = "MISSING_FUNCTION_ERROR" attr_reader :function_name # Create a new MissingFunctionError # # @param function_name [Symbol, String] the function name that wasn't registered # def initialize(function_name) @function_name = function_name super("Custom function not registered: #{function_name}") end end |