Module: Zoidberg::Supervise

Defined in:
lib/zoidberg/supervise.rb

Overview

Add supervision to instance

Defined Under Namespace

Modules: InstanceMethods Classes: AbortException

Class Method Summary collapse

Class Method Details

.included(klass) ⇒ Object

Include supervision into given class when included



40
41
42
43
44
45
46
47
48
49
# File 'lib/zoidberg/supervise.rb', line 40

def self.included(klass)
  unless(klass.include?(Zoidberg::Shell))
    klass.class_eval{ include Zoidberg::Shell }
  end
  unless(klass.include?(Zoidberg::Supervise::InstanceMethods))
    klass.class_eval do
      include InstanceMethods
    end
  end
end