Parent

Class/Module Index [+]

Quicksearch

Hash

Extensions to Hash needed by Reek.

Public Instance Methods

adopt(other) click to toggle source
# File lib/reek/core/sniffer.rb, line 26
def adopt(other)
  self.deep_copy.adopt!(other)
end
adopt!(other) click to toggle source
# File lib/reek/core/sniffer.rb, line 14
def adopt!(other)
  other.keys.each do |key|
    ov = other[key]
    if Array === ov and has_key?(key)
      self[key] += ov
    else
      self[key] = ov
    end
  end
  self
end
deep_copy() click to toggle source
# File lib/reek/core/sniffer.rb, line 30
def deep_copy
  YAML::load(YAML::dump(self))
end
push_keys(hash) click to toggle source
# File lib/reek/core/sniffer.rb, line 10
def push_keys(hash)
  keys.each {|key| hash[key].adopt!(self[key]) }
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.