Sha256: 8b59c4295157f9af9c03248e93b2b2c85487da8ebb9dcb075ec7355a71b16b6f

Contents?: true

Size: 138 Bytes

Versions: 7

Compression:

Stored size: 138 Bytes

Contents

# frozen_string_literal: true

require 'json'

def json_value(file, key)
  begin JSON.parse(File.read(file))[key.to_s] rescue nil end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
spout-0.12.1 lib/spout/tests/json_helper.rb
spout-0.12.0 lib/spout/tests/json_helper.rb
spout-0.12.0.rc2 lib/spout/tests/json_helper.rb
spout-0.12.0.rc lib/spout/tests/json_helper.rb
spout-0.12.0.beta2 lib/spout/tests/json_helper.rb
spout-0.12.0.beta1 lib/spout/tests/json_helper.rb
spout-0.11.1 lib/spout/tests/json_helper.rb