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

Version Path
aio_elin-1.1.8 lib/modules/output/style/compare_json.rb
aio_elin-1.1.7 lib/modules/output/style/compare_json.rb
aio_elin-1.1.4 lib/modules/output/style/compare_json.rb
aio_elin-1.1.3 lib/modules/output/style/compare_json.rb
aio_elin-1.1.2 lib/modules/output/style/compare_json.rb
aio_elin-1.1.1 lib/modules/output/style/compare_json.rb
aio_elin-1.1.0 lib/modules/output/style/compare_json.rb
aio_elin-1.0.9 lib/modules/output/style/compare_json.rb
aio_elin-1.0.8 lib/modules/output/style/compare_json.rb
aio_elin-1.0.7 lib/modules/output/style/compare_json.rb
aio_elin-1.0.6 lib/modules/output/style/compare_json.rb
aio_elin-1.0.5 lib/modules/output/style/compare_json.rb
aio_elin-1.0.4 lib/modules/output/style/compare_json.rb
aio_elin-1.0.3 lib/modules/output/style/compare_json.rb
aio_elin-1.0.2 lib/modules/output/style/compare_json.rb
aio_elin-1.0.1 lib/modules/output/style/compare_json.rb
aio_elin-1.0.0 lib/modules/output/style/compare_json.rb
aio_elin-0.0.1 lib/modules/output/style/compare_json.rb