lib/saneitized/array.rb in saneitized-1.3.0 vs lib/saneitized/array.rb in saneitized-1.3.1
- old
+ new
@@ -1,20 +1,21 @@
module Saneitized
class Array < SimpleDelegator
- def initialize(array = [])
- super(array.map{|item| Saneitized.convert(item)})
+ def initialize(array = [], options = {})
+ @options = options
+ super(array.map{|item| Saneitized.convert(item, options)})
self
end
def []=(index, value)
- super index, Saneitized.convert(value)
+ super index, Saneitized.convert(value, @options)
end
def << (value)
- super Saneitized.convert(value)
+ super Saneitized.convert(value, @options)
end
def push(*args)
raise NotImplementedError
end