Sha256: 8cfd3af7e0903014f4246e117e3f39a809eb60f7b612d36a662695b447b8907b
Contents?: true
Size: 527 Bytes
Versions: 18
Compression:
Stored size: 527 Bytes
Contents
#coding=utf-8 require "aio/core" require "json" class Aio::Module::OutputStyle::CompareJson < Aio::Module::OutputStyle def initialize super({ :author => "Elin", :description => "这个模块输出为json文件,用于和基准值比较。", :file_suffix => "js", }) end def generate file = File.new(output_file, "w+") device_hash = {} each_devices_with_useful do |device_name, useful| device_hash[device_name] = useful end #puts device_hash.to_json file.puts device_hash.to_json end end
Version data entries
18 entries across 18 versions & 1 rubygems