Class: RSpecRcv::Codecs::PrettyJson

Inherits:
Object
  • Object
show all
Defined in:
lib/rspec-rcv/codecs/pretty_json.rb

Instance Method Summary collapse

Instance Method Details

#decode_with(str) ⇒ Object



10
11
12
# File 'lib/rspec-rcv/codecs/pretty_json.rb', line 10

def decode_with(str)
  JSON.parse(str)
end

#export_with(hash) ⇒ Object



6
7
8
# File 'lib/rspec-rcv/codecs/pretty_json.rb', line 6

def export_with(hash)
  JSON.pretty_generate(hash)
end