Method: Volt::ReactiveHash#replace

Defined in:
lib/volt/reactive/reactive_hash.rb

#replace(hash) ⇒ Object



55
56
57
58
59
60
61
# File 'lib/volt/reactive/reactive_hash.rb', line 55

def replace(hash)
  clear

  hash.each_pair do |key, value|
    self[key] = value
  end
end