class Pragma::Macro::MissingSkillError
Error raised when a skill is required but not present.
@private
Public Class Methods
new(macro, skill)
click to toggle source
Initializes the error.
@param macro [String] the macro requiring the skill @param skill [String] the name of the missing skill
Calls superclass method
# File lib/pragma/macro.rb, line 30 def initialize(macro, skill) message = <<~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 message end