Class: Loom::Shell::Core::LocalShell

Inherits:
Loom::Shell::Core show all
Defined in:
lib/loom/shell/core.rb

Overview

A shell object restricted to localhost.

Instance Attribute Summary

Attributes inherited from Loom::Shell::Core

#dry_run, #mod_loader, #session, #shell_api

Instance Method Summary collapse

Methods inherited from Loom::Shell::Core

#capture, #cd, #execute, #is_sudo?, #pipe, #sudo, #test, #upload, #verify, #verify_which, #wrap

Constructor Details

#initialize(mod_loader, session, dry_run) ⇒ LocalShell

Returns a new instance of LocalShell.



257
258
259
260
# File 'lib/loom/shell/core.rb', line 257

def initialize(mod_loader, session, dry_run)
  super mod_loader, SSHKit::Backend::Local.new, dry_run
  @session = session
end

Instance Method Details

#localObject



262
263
264
# File 'lib/loom/shell/core.rb', line 262

def local
  raise 'already in a local shell'
end

#prompt_labelObject



266
267
268
# File 'lib/loom/shell/core.rb', line 266

def prompt_label
  "local"
end