Class: AutomateIt::TemplateManager::BaseDriver

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

Overview

TemplateManager::BaseDriver

Base class for all TemplateManager drivers.

Direct Known Subclasses

ERB

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 collapse

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, #suitability

Methods inherited from Plugin::Base

#token, token

Methods inherited from Common

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

Constructor Details

This class inherits a constructor from AutomateIt::Common

Instance Attribute Details

#default_checkObject

Name of default algorithm for performing checks, e.g., :compare



6
7
8
# File 'lib/automateit/template_manager/base.rb', line 6

def default_check
  @default_check
end

Instance Method Details

#setup(opts = {}) ⇒ Object

Options:

  • :default_check - Set the #default_check, e.g., :compare



10
11
12
13
14
15
16
17
# File 'lib/automateit/template_manager/base.rb', line 10

def setup(opts={})
  super(opts)
  if opts[:default_check]
    @default_check = opts[:default_check]
  else
    @default_check ||= :compare
  end
end