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

Version Path
automate-it-0.9.2 lib/automateit/common.rb
automate-it-0.9.1 lib/automateit/common.rb
automate-it-0.9.0 lib/automateit/common.rb
automateit-0.70923 lib/automateit/common.rb
automateit-0.70928 lib/automateit/common.rb
automateit-0.71003 lib/automateit/common.rb
automateit-0.70930 lib/automateit/common.rb
automateit-0.71030 lib/automateit/common.rb
automateit-0.71031.2 lib/automateit/common.rb
automateit-0.71021 lib/automateit/common.rb
automateit-0.71006 lib/automateit/common.rb
automateit-0.71012 lib/automateit/common.rb
automateit-0.71031.1 lib/automateit/common.rb
automateit-0.71017 lib/automateit/common.rb
automateit-0.71031 lib/automateit/common.rb
automateit-0.71101.1 lib/automateit/common.rb
automateit-0.71101.2 lib/automateit/common.rb
automateit-0.71102 lib/automateit/common.rb
automateit-0.71103 lib/automateit/common.rb
automateit-0.71101 lib/automateit/common.rb