Exception: Pragma::Macro::MissingSkillError
- Inherits:
-
StandardError
- Object
- StandardError
- Pragma::Macro::MissingSkillError
- Defined in:
- lib/pragma/macro.rb
Overview
Error raised when a skill is required but not present.
Instance Method Summary collapse
-
#initialize(macro, skill) ⇒ MissingSkillError
constructor
Initializes the error.
Constructor Details
#initialize(macro, skill) ⇒ MissingSkillError
Initializes the error.
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/pragma/macro.rb', line 30 def initialize(macro, skill) = <<~ERROR You are attempting to use the #{macro} macro, but no `#{skill}' skill is defined. You can define the skill by adding the following to your operation: self['#{skill}'] = MyCustomClass If the skill holds a class, this can happen when the required class (e.g. the contract class) is not in the expected location. If that's the case, you can just move the class to the expected location and avoid defining the skill manually. ERROR super end |