Sha256: 74dd853ac4084e2b1585a1dc09a1d7462a3ea9c5d255de65b1f8db010cda219f
Contents?: true
Size: 1.81 KB
Versions: 31
Compression:
Stored size: 1.81 KB
Contents
module AutomateIt # == Common # # Common is the abstract class that most AutomateIt classes inherit from. class Common include AutomateIt::Constants # Interpreter instance for this class. attr_accessor :interpreter # Calls #setup with +options+ for processing. def initialize(options={}) setup(options) end # Setup the class. Options: # * :interpreter - Set the Interpreter. def setup(options={}) @interpreter = options[:interpreter] if options[:interpreter] end #---[ Interpreter aliases ]--------------------------------------------- unless defined?(AutomateIt::Interpreter) and AutomateIt::Interpreter === self # See Interpreter#log def log() @interpreter.log end # See Interpreter#noop= def noop=(value) @interpreter.noop=(value) end # See Interpreter#noop def noop(value) @interpreter.noop(value) end # See Interpreter#noop? def noop?() @interpreter.noop?() end # See Interpreter#writing= def writing=(value) @interpreter.writing=(value) end # See Interpreter#writing def writing(value) @interpreter.writing(value) end # See Interpreter#writing? def writing?() @interpreter.writing?() end # See Interpreter#preview? def preview?() @interpreter.preview?() end # See Interpreter#preview def preview(value=nil) @interpreter.preview(value) end # See Interpreter#preview= def preview=(value) @interpreter.preview=(value) end # See Interpreter#preview_for def preview_for(message, &block) @interpreter.preview_for(message, &block) end # See Interpreter#superuser? def superuser?() @interpreter.superuser? end # See Interpreter#nitpick def nitpick(value=nil) @interpreter.nitpick(value) end end end end
Version data entries
31 entries across 31 versions & 2 rubygems