Method: OpsWalrus::RemoteImportInvocationContext#initialize

Defined in:
lib/opswalrus/invocation.rb

#initialize(runtime_env, host_proxy, namespace_or_ops_file, is_invocation_a_call_to_package_in_bundle_dir = false, ops_prompt_for_sudo_password: nil) ⇒ RemoteImportInvocationContext

Returns a new instance of RemoteImportInvocationContext.



38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# File 'lib/opswalrus/invocation.rb', line 38

def initialize(runtime_env, host_proxy, namespace_or_ops_file, is_invocation_a_call_to_package_in_bundle_dir = false, ops_prompt_for_sudo_password: nil)
  @runtime_env = runtime_env
  @host_proxy = host_proxy
  @initial_namespace_or_ops_file = @namespace_or_ops_file = namespace_or_ops_file
  @is_invocation_a_call_to_package_in_bundle_dir = is_invocation_a_call_to_package_in_bundle_dir

  initial_method_name = case @namespace_or_ops_file
  when Namespace
    @namespace_or_ops_file.dirname.basename
  when OpsFile
    @namespace_or_ops_file.basename
  end
  @method_chain = [initial_method_name]
  @ops_prompt_for_sudo_password = ops_prompt_for_sudo_password
end