Sha256: a1c629b621790aad6ba39d2aea2d0a342736c2e84e8159a4abefeafbecab7d67
Contents?: true
Size: 581 Bytes
Versions: 102
Compression:
Stored size: 581 Bytes
Contents
# frozen_string_literal: true require 'avm/eac_generic_base0/file_formats/base' module Avm module EacWebappBase0 module FileFormats class Json < ::Avm::EacGenericBase0::FileFormats::Base VALID_BASENAMES = %w[*.json].freeze VALID_TYPES = [].freeze def file_apply(file) ::File.write(file, ::JSON.pretty_generate(::JSON.parse(::File.read(file)))) end def json_file?(file) ::JSON.parse(::File.read(file)) true rescue JSON::ParserError false end end end end end
Version data entries
102 entries across 102 versions & 2 rubygems