We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bf13dc6 commit 337cda7Copy full SHA for 337cda7
lib/turbo_boost/commands/runner.rb
@@ -38,7 +38,8 @@ def command_valid?
38
end
39
40
# validate method
41
- unless command_instance.respond_to?(command_method_name)
+ ancestors = command_class.ancestors[0..command_class.ancestors.index(TurboBoost::Commands::Command) - 1]
42
+ unless ancestors.any? { |a| a.public_instance_methods(false).any? command_method_name.to_sym }
43
raise TurboBoost::Commands::InvalidMethodError,
44
"`#{command_class_name}` does not define the public method `#{command_method_name}`!"
45
0 commit comments