Class: MonitoredHash

Inherits:
Hash
  • Object
show all
Includes:
Observable
Defined in:
lib/repositories/monitored_hash.rb

Instance Method Summary collapse

Instance Method Details

#[]=(key, value) ⇒ Object



7
8
9
10
11
# File 'lib/repositories/monitored_hash.rb', line 7

def []=(key, value)
  nontainting_assign(key, value)
  changed
  notify_observers(self)
end

#clearObject



35
36
37
38
39
# File 'lib/repositories/monitored_hash.rb', line 35

def clear
  nontainting_clear
  changed
  notify_observers(self)
end

#delete(key, &block) ⇒ Object



14
15
16
17
18
# File 'lib/repositories/monitored_hash.rb', line 14

def delete(key, &block)
  nontainting_delete(key, &block)
  changed
  notify_observers(self)
end

#merge!(hsh) ⇒ Object



42
43
44
45
46
# File 'lib/repositories/monitored_hash.rb', line 42

def merge!(hsh)
  nontainting_merge!(hsh)
  changed
  notify_observers(self)
end

#nontainting_assignObject



6
# File 'lib/repositories/monitored_hash.rb', line 6

alias :nontainting_assign :[]=

#nontainting_clearObject



34
# File 'lib/repositories/monitored_hash.rb', line 34

alias :nontainting_clear :clear

#nontainting_deleteObject



13
# File 'lib/repositories/monitored_hash.rb', line 13

alias :nontainting_delete :delete

#nontainting_merge!Object



41
# File 'lib/repositories/monitored_hash.rb', line 41

alias :nontainting_merge! :merge!

#nontainting_reject!Object



27
# File 'lib/repositories/monitored_hash.rb', line 27

alias :nontainting_reject! :reject!

#nontainting_replaceObject



48
# File 'lib/repositories/monitored_hash.rb', line 48

alias :nontainting_replace :replace

#nontainting_shiftObject



20
# File 'lib/repositories/monitored_hash.rb', line 20

alias :nontainting_shift :shift

#nontainting_storeObject



55
# File 'lib/repositories/monitored_hash.rb', line 55

alias :nontainting_store :store

#nontainting_updateObject



62
# File 'lib/repositories/monitored_hash.rb', line 62

alias :nontainting_update :update

#reject!(&block) ⇒ Object



28
29
30
31
32
# File 'lib/repositories/monitored_hash.rb', line 28

def reject!(&block)
  nontainting_reject!(&block)
  changed
  notify_observers(self)
end

#replace(hsh) ⇒ Object



49
50
51
52
53
# File 'lib/repositories/monitored_hash.rb', line 49

def replace(hsh)
  nontainting_replace(hsh)
  changed
  notify_observers(self)
end

#shiftObject



21
22
23
24
25
# File 'lib/repositories/monitored_hash.rb', line 21

def shift
  nontainting_shift
  changed
  notify_observers(self)
end

#store(key, value) ⇒ Object



56
57
58
59
60
# File 'lib/repositories/monitored_hash.rb', line 56

def store(key, value)
  nontainting_store(key, value)
  changed
  notify_observers(self)
end

#update(hsh) ⇒ Object



63
64
65
66
67
# File 'lib/repositories/monitored_hash.rb', line 63

def update(hsh)
  nontainting_update(hsh)
  changed
  notify_observers(self)
end