12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
# File 'lib/jets/commands/call/anonymous_guesser.rb', line 12
def method_name
return @method_name if defined?(@method_name)
full_function_name = @provided_function_name.underscore
underscored_class_name = class_name.underscore
meth = full_function_name.sub("#{underscored_class_name}_","")
if meth == class_name.constantize.handler.to_s
@method_name = meth
else
@method_name_error = "#{class_name} class found but #{meth} method not found"
@method_name = nil
end
end
|