Class: AutomateIt::Common
- Includes:
- Constants
- Defined in:
- lib/automateit/common.rb
Overview
Common
Common is the abstract class that most AutomateIt classes inherit from.
Direct Known Subclasses
CLI, EditManager::EditSession, Interpreter, Plugin::Base, Project
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
-
#interpreter ⇒ Object
Interpreter instance for this class.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Common
constructor
Calls #setup with
options
for processing. -
#log ⇒ Object
See Interpreter#log.
-
#nitpick(value = nil) ⇒ Object
See Interpreter#nitpick.
-
#noop(value) ⇒ Object
See Interpreter#noop.
-
#noop=(value) ⇒ Object
See Interpreter#noop=.
-
#noop? ⇒ Boolean
See Interpreter#noop?.
-
#preview(value = nil) ⇒ Object
See Interpreter#preview.
-
#preview=(value) ⇒ Object
See Interpreter#preview=.
-
#preview? ⇒ Boolean
See Interpreter#preview?.
-
#preview_for(message, &block) ⇒ Object
See Interpreter#preview_for.
-
#setup(options = {}) ⇒ Object
Setup the class.
-
#superuser? ⇒ Boolean
See Interpreter#superuser?.
-
#writing(value) ⇒ Object
See Interpreter#writing.
-
#writing=(value) ⇒ Object
See Interpreter#writing=.
-
#writing? ⇒ Boolean
See Interpreter#writing?.
Constructor Details
#initialize(options = {}) ⇒ Common
Calls #setup with options
for processing.
12 13 14 |
# File 'lib/automateit/common.rb', line 12 def initialize(={}) setup() end |
Instance Attribute Details
#interpreter ⇒ Object
Interpreter instance for this class.
9 10 11 |
# File 'lib/automateit/common.rb', line 9 def interpreter @interpreter end |
Instance Method Details
#log ⇒ Object
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?
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?
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(, &block) @interpreter.preview_for(, &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(={}) @interpreter = [:interpreter] if [:interpreter] end |
#superuser? ⇒ Boolean
See Interpreter#superuser?
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?
44 |
# File 'lib/automateit/common.rb', line 44 def writing?() @interpreter.writing?() end |