Method: List#replace

Defined in:
lib/M500_containers.rb

#replace(enum) ⇒ Object



89
90
91
92
93
94
95
96
97
# File 'lib/M500_containers.rb', line 89

def replace(enum)
  if enum.instance_of?(self.class)
    @hash.replace(enum.instance_variable_get(:@hash))
  else
    clear
    merge(enum)
  end
  self
end