Module: ObservableObject::Watcher

Defined in:
lib/observable_object.rb

Defined Under Namespace

Classes: WatcherCompare, WatcherDetect, WatcherMethods

Class Method Summary collapse

Class Method Details

.create(obj, methods) ⇒ Object



76
77
78
79
80
81
82
# File 'lib/observable_object.rb', line 76

def self.create(obj,methods)
  case methods
    when :detect then WatcherDetect.new(obj)
    when :compare then WatcherCompare.new
    else WatcherMethods.new(methods)
  end
end