Sha256: d3acfd2f67c62a12de80a36ad2439fce8af51c32a74e8b409750843c5c38af2b

Contents?: true

Size: 157 Bytes

Versions: 3

Compression:

Stored size: 157 Bytes

Contents

# frozen_string_literal: true

require "json"

def json_value(file, key)
  begin JSON.parse(File.read(file, encoding: "utf-8"))[key.to_s] rescue nil end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
spout-1.0.0 lib/spout/tests/json_helper.rb
spout-1.0.0.beta3 lib/spout/tests/json_helper.rb
spout-1.0.0.beta2 lib/spout/tests/json_helper.rb