Sha256: 29abf62e53a2f2c992e1c4be486a8ad3f0534bf1123d1f375539e1d3612283b7

Contents?: true

Size: 363 Bytes

Versions: 15

Compression:

Stored size: 363 Bytes

Contents

require "observer"

module Rubyipmi
  class ObservableHash < Hash
    include Observable

    # this method will merge the hash and then notify all observers, if any
    def merge_notify!(newhash)
      merge!(newhash)
      changed
      notify_observers(self)
    end

    def delete_notify(del)
      delete(del)
      notify_observers(self)
    end

  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
rubyipmi-0.10.0 lib/rubyipmi/observablehash.rb
rubyipmi-0.9.3 lib/rubyipmi/observablehash.rb
rubyipmi-0.9.2 lib/rubyipmi/observablehash.rb
rubyipmi-0.9.1 lib/rubyipmi/observablehash.rb
rubyipmi-0.9.0 lib/rubyipmi/observablehash.rb
rubyipmi-0.8.1 lib/rubyipmi/observablehash.rb
rubyipmi-0.7.0 lib/rubyipmi/observablehash.rb
rubyipmi-0.6.0 lib/rubyipmi/observablehash.rb
rubyipmi-0.5.1 lib/rubyipmi/observablehash.rb
rubyipmi-0.5.0 lib/rubyipmi/observablehash.rb
rubyipmi-0.4.0 lib/rubyipmi/observablehash.rb
rubyipmi-0.3.3 lib/rubyipmi/observablehash.rb
rubyipmi-0.3.2 lib/rubyipmi/observablehash.rb
rubyipmi-0.3.1 lib/rubyipmi/observablehash.rb
rubyipmi-0.3.0 lib/rubyipmi/observablehash.rb