Module: Capybara::Poltergeist::JSON

Defined in:
lib/capybara/poltergeist/json.rb

Class Method Summary collapse

Class Method Details

.dump(message) ⇒ Object


11
12
13
14
15
16
17
# File 'lib/capybara/poltergeist/json.rb', line 11

def self.dump(message)
  if dumpy_multi_json?
    MultiJson.dump(message)
  else
    MultiJson.encode(message)
  end
end

.load(message) ⇒ Object


3
4
5
6
7
8
9
# File 'lib/capybara/poltergeist/json.rb', line 3

def self.load(message)
  if dumpy_multi_json?
    MultiJson.load(message)
  else
    MultiJson.decode(message)
  end
end