Class: MonitoredArray

Inherits:
Array
  • Object
show all
Includes:
Observable
Defined in:
lib/repositories/monitored_array.rb

Instance Method Summary collapse

Methods inherited from Array

#shift_mask_right, #swap, #swap_with_index, #unique_push!

Instance Method Details

#<<(value) ⇒ Object



15
16
17
18
19
20
# File 'lib/repositories/monitored_array.rb', line 15

def <<(value)
  val = nontainting_append(value)
  changed
  notify_observers(self)
  val
end

#[]=(index, value) ⇒ Object



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

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

#collect!(&block) ⇒ Object



87
88
89
90
91
92
# File 'lib/repositories/monitored_array.rb', line 87

def collect!(&block)
  val = nontainting_collect!(&block)
  changed
  notify_observers(self)
  val
end

#compact!Object



95
96
97
98
99
100
# File 'lib/repositories/monitored_array.rb', line 95

def compact!
  val = nontainting_compact!
  changed
  notify_observers(self)
  val
end

#delete(value) ⇒ Object



23
24
25
26
27
28
# File 'lib/repositories/monitored_array.rb', line 23

def delete(value)
  val = nontainting_delete(value)
  changed
  notify_observers(self)
  val
end

#flatten!Object



119
120
121
122
123
124
# File 'lib/repositories/monitored_array.rb', line 119

def flatten!
  val = nontainting_flatten!
  changed
  notify_observers(self)
  val
end

#map!(&block) ⇒ Object



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

def map!(&block)
  val = nontainting_map!(&block)
  changed
  notify_observers(self)
  val
end

#nontainting_appendObject



14
# File 'lib/repositories/monitored_array.rb', line 14

alias :nontainting_append :<<

#nontainting_assignObject



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

alias :nontainting_assign :[]=

#nontainting_collect!Object



86
# File 'lib/repositories/monitored_array.rb', line 86

alias :nontainting_collect! :collect!

#nontainting_compact!Object



94
# File 'lib/repositories/monitored_array.rb', line 94

alias :nontainting_compact! :compact!

#nontainting_deleteObject



22
# File 'lib/repositories/monitored_array.rb', line 22

alias :nontainting_delete :delete

#nontainting_flatten!Object



118
# File 'lib/repositories/monitored_array.rb', line 118

alias :nontainting_flatten! :flatten!

#nontainting_map!Object



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

alias :nontainting_map! :map!

#nontainting_popObject



38
# File 'lib/repositories/monitored_array.rb', line 38

alias :nontainting_pop :pop

#nontainting_pushObject



30
# File 'lib/repositories/monitored_array.rb', line 30

alias :nontainting_push :push

#nontainting_reject!Object



102
# File 'lib/repositories/monitored_array.rb', line 102

alias :nontainting_reject! :reject!

#nontainting_reverse!Object



78
# File 'lib/repositories/monitored_array.rb', line 78

alias :nontainting_reverse! :reverse!

#nontainting_shiftObject



46
# File 'lib/repositories/monitored_array.rb', line 46

alias :nontainting_shift :shift

#nontainting_slice!Object



110
# File 'lib/repositories/monitored_array.rb', line 110

alias :nontainting_slice! :slice!

#nontainting_sort!Object



70
# File 'lib/repositories/monitored_array.rb', line 70

alias :nontainting_sort! :sort!

#nontainting_uniq!Object



126
# File 'lib/repositories/monitored_array.rb', line 126

alias :nontainting_uniq! :uniq!

#nontainting_unshiftObject



54
# File 'lib/repositories/monitored_array.rb', line 54

alias :nontainting_unshift :unshift

#popObject



39
40
41
42
43
44
# File 'lib/repositories/monitored_array.rb', line 39

def pop
  val = nontainting_pop
  changed
  notify_observers(self)
  val
end

#push(value) ⇒ Object



31
32
33
34
35
36
# File 'lib/repositories/monitored_array.rb', line 31

def push(value)
  val = nontainting_push(value)
  changed
  notify_observers(self)
  val
end

#reject!(&block) ⇒ Object



103
104
105
106
107
108
# File 'lib/repositories/monitored_array.rb', line 103

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

#reverse!Object



79
80
81
82
83
84
# File 'lib/repositories/monitored_array.rb', line 79

def reverse!
  val = nontainting_reverse!
  changed
  notify_observers(self)
  val
end

#shiftObject



47
48
49
50
51
52
# File 'lib/repositories/monitored_array.rb', line 47

def shift
  val = nontainting_shift
  changed
  notify_observers(self)
  val
end

#slice!(*args) ⇒ Object



111
112
113
114
115
116
# File 'lib/repositories/monitored_array.rb', line 111

def slice!(*args)
  val = nontainting_slice!(*args)
  changed
  notify_observers(self)
  val
end

#sort!(&block) ⇒ Object



71
72
73
74
75
76
# File 'lib/repositories/monitored_array.rb', line 71

def sort!(&block)
  val = nontainting_sort!(&block)
  changed
  notify_observers(self)
  val
end

#uniq!Object



127
128
129
130
131
132
# File 'lib/repositories/monitored_array.rb', line 127

def uniq!
  val = nontainting_uniq!
  changed
  notify_observers(self)
  val
end

#unshift(value) ⇒ Object



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

def unshift(value)
  val = nontainting_unshift(value)
  changed
  notify_observers(self)
  val
end