Class: AutomateIt::ShellManager::BaseDriver

Inherits:
Plugin::Driver show all
Defined in:
lib/automateit/shell_manager.rb

Overview

ShellManager::BaseDriver

Base class for all ShellManager drivers.

Direct Known Subclasses

BaseLink, Portable, WhichBase

Constant Summary

Constants inherited from Plugin::Driver

Plugin::Driver::BASE_DRIVER_NAME

Constants included from Constants

Constants::HELPERS_DIR, Constants::INSTALL_DIR, Constants::PERROR, Constants::PEXEC, Constants::PNOTE, Constants::WARNING_BOILERPLATE

Instance Attribute Summary

Attributes inherited from Plugin::Driver

#manager

Attributes inherited from Common

#interpreter

Instance Method Summary collapse

Methods inherited from Plugin::Driver

abstract_driver, #available?, base_driver, base_driver?, depends_on, inherited, manager_token, #setup, #suitability

Methods inherited from Plugin::Base

#setup, #token, token

Methods inherited from Common

#initialize, #log, #nitpick, #noop, #noop=, #noop?, #preview, #preview=, #preview?, #preview_for, #setup, #superuser?, #writing, #writing=, #writing?

Constructor Details

This class inherits a constructor from AutomateIt::Common

Instance Method Details

#peer_for(source, target) ⇒ Object

Returns derived filename to use as a peer given the source and target. This is necessary for differentiating between directory and file targets.

For example:

# Get the peer for an extant target directory:
peer_for("foo", "/tmp") # => "/tmp/foo"

# Get the peer for anything else:
peer_for("foo", "/bar") # => "/bar"


280
281
282
# File 'lib/automateit/shell_manager.rb', line 280

def peer_for(source, target)
  return FileUtils.send(:fu_each_src_dest0, source, target){|a, b| b}
end