Method: OpsWalrus::RemoteImportInvocationContext#_resolve_method_and_invoke

Defined in:
lib/opswalrus/invocation.rb

#_resolve_method_and_invoke(name, *args, **kwargs) ⇒ Object



58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# File 'lib/opswalrus/invocation.rb', line 58

def _resolve_method_and_invoke(name, *args, **kwargs)
  if _bang_method?(name)      # foo! is an attempt to invoke the module's default entrypoint
    method_name = _non_bang_method(name)

    @method_chain << method_name

    @namespace_or_ops_file = @namespace_or_ops_file.resolve_symbol(method_name)
    _invoke_if_namespace_has_ops_file_of_same_name(*args, **kwargs)
  else
    @method_chain << name.to_s

    @namespace_or_ops_file = @namespace_or_ops_file.resolve_symbol(name)
    _invoke(*args, **kwargs)
  end
end