Module: MergeObservable

Includes:
Observable
Included in:
PackageManager::ParseXML
Defined in:
lib/JRubyR/package.rb

Instance Method Summary (collapse)

Instance Method Details

- (Object) add_new_observer(observer)



38
39
40
41
# File 'lib/JRubyR/package.rb', line 38

def add_new_observer(observer)
  @new_observers ||= Array.new
  @new_observers << observer
end

- (Object) merge_observers



43
44
45
46
47
48
49
# File 'lib/JRubyR/package.rb', line 43

def merge_observers
  @new_observers ||= Array.new
  @new_observers.each do |obs|
    self.add_observer(obs)
  end
  @new_observers = nil 
end

- (Object) notify_observers(*args)



51
52
53
54
# File 'lib/JRubyR/package.rb', line 51

def notify_observers(*args)
  merge_observers
  old_notify(*args)
end

- (Object) old_notify



36
# File 'lib/JRubyR/package.rb', line 36

alias_method :old_notify, :notify_observers