Class: MockServer::State

Inherits:
Hashie::Dash
  • Object
show all
Defined in:
lib/mock_server/state.rb

Instance Method Summary collapse

Instance Method Details

#merge(hash) ⇒ Object



17
18
19
20
21
22
23
# File 'lib/mock_server/state.rb', line 17

def merge(hash)
  new_hash = self
  hash.each do |k,v|
    new_hash[k] = v
  end
  new_hash
end

#merge!(hash) ⇒ Object



25
26
27
28
29
30
# File 'lib/mock_server/state.rb', line 25

def merge!(hash)
  hash.each do |k,v|
    self[k] = v
  end
  self
end