class AutomateIt::Plugin::Base

Plugin::Base

An AutomateIt Plugin provides the Interpreter with the functionality that users actually care about, such as installing packages or adding users. The Plugin::Base class isn’t useful by itself but provides behavior that’s inherited by the Plugin::Manager and Plugin::Driver classes.

Public Class Methods

token() click to toggle source

See token.

# File lib/automateit/plugin/base.rb, line 27
def self.token
  return to_s.demodulize.underscore.to_sym
end

Public Instance Methods

token() click to toggle source

Get token for the plugin. The token is a symbol that represents the classname of the underlying object.

Example:

AddressManager.token # => :address_manager
AddressManager::Portable.token => :portable
# File lib/automateit/plugin/base.rb, line 22
def token
  self.class.token
end