Class: AutomateIt::Common

Inherits:
Object show all
Includes:
Constants
Defined in:
lib/automateit/common.rb

Overview

Common

Common is the abstract class that most AutomateIt classes inherit from.

Constant Summary

Constants included from Constants

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Common

Calls #setup with options for processing.



12
13
14
# File 'lib/automateit/common.rb', line 12

def initialize(options={})
  setup(options)
end

Instance Attribute Details

#interpreterObject

Interpreter instance for this class.



9
10
11
# File 'lib/automateit/common.rb', line 9

def interpreter
  @interpreter
end

Instance Method Details

#logObject

See Interpreter#log



26
# File 'lib/automateit/common.rb', line 26

def log() @interpreter.log end

#nitpick(value = nil) ⇒ Object

See Interpreter#nitpick



62
# File 'lib/automateit/common.rb', line 62

def nitpick(value=nil) @interpreter.nitpick(value) end

#noop(value) ⇒ Object

See Interpreter#noop



32
# File 'lib/automateit/common.rb', line 32

def noop(value) @interpreter.noop(value) end

#noop=(value) ⇒ Object

See Interpreter#noop=



29
# File 'lib/automateit/common.rb', line 29

def noop=(value) @interpreter.noop=(value) end

#noop?Boolean

See Interpreter#noop?

Returns:

  • (Boolean)


35
# File 'lib/automateit/common.rb', line 35

def noop?() @interpreter.noop?() end

#preview(value = nil) ⇒ Object

See Interpreter#preview



50
# File 'lib/automateit/common.rb', line 50

def preview(value=nil) @interpreter.preview(value) end

#preview=(value) ⇒ Object

See Interpreter#preview=



53
# File 'lib/automateit/common.rb', line 53

def preview=(value) @interpreter.preview=(value) end

#preview?Boolean

See Interpreter#preview?

Returns:

  • (Boolean)


47
# File 'lib/automateit/common.rb', line 47

def preview?() @interpreter.preview?() end

#preview_for(message, &block) ⇒ Object

See Interpreter#preview_for



56
# File 'lib/automateit/common.rb', line 56

def preview_for(message, &block) @interpreter.preview_for(message, &block) end

#setup(options = {}) ⇒ Object

Setup the class. Options:

  • :interpreter - Set the Interpreter.



18
19
20
# File 'lib/automateit/common.rb', line 18

def setup(options={})
  @interpreter = options[:interpreter] if options[:interpreter]
end

#superuser?Boolean

See Interpreter#superuser?

Returns:

  • (Boolean)


59
# File 'lib/automateit/common.rb', line 59

def superuser?() @interpreter.superuser? end

#writing(value) ⇒ Object

See Interpreter#writing



41
# File 'lib/automateit/common.rb', line 41

def writing(value) @interpreter.writing(value) end

#writing=(value) ⇒ Object

See Interpreter#writing=



38
# File 'lib/automateit/common.rb', line 38

def writing=(value) @interpreter.writing=(value) end

#writing?Boolean

See Interpreter#writing?

Returns:

  • (Boolean)


44
# File 'lib/automateit/common.rb', line 44

def writing?() @interpreter.writing?() end