lib/hedgelog/scrub_replacement.rb in hedgelog-0.1.9 vs lib/hedgelog/scrub_replacement.rb in hedgelog-0.1.11
- old
+ new
@@ -16,22 +16,21 @@
end
def scrub_hash(hash)
hash.each do |key, val|
next hash[key] = @replacement if key.to_s.casecmp(@key.to_s).zero?
+
scrub_thing(val)
end
end
def scrub_array(array)
array.each do |val|
scrub_thing(val)
end
end
- private
-
- def scrub_thing(thing)
+ private def scrub_thing(thing)
scrub_string(thing) if thing.is_a?(String)
scrub_array(thing) if thing.is_a?(Array)
scrub_hash(thing) if thing.is_a?(Hash)
end
end