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.



254
255
256
257
# File 'lib/loom/shell/core.rb', line 254

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

Instance Method Details

#localObject



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

def local
  raise 'already in a local shell'
end

#prompt_labelObject



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

def prompt_label
  "local"
end