Sha256: d57fb59c4507638992ce4d39abc36347e5c8caecb3ee7905efb5a0eed65d9381
Contents?: true
Size: 858 Bytes
Versions: 18
Compression:
Stored size: 858 Bytes
Contents
#coding=utf-8 require "aio/core" class Aio::Module::Cmd::Maipu::ShowEnv < Aio::Module::Cmd::Maipu include Aio::Module def initialize super({ :cmd_full => "show environment", :cmd_short => "sh env", :author => "Elin", :description => "This is Maipu Command# show environment", :ranking => Ranking_1, :platform => "all", :benchmark => { :cpu_temperature => ["<", 70], :mainboard_temperature => ["<", 70], } }) end def parse cont = self.context.dup env = {} useful[:env] = env context.readline_match_block(/CPU Temperature is (?<cpu_temperature>\d+)/) do |block| block.warning_serious(env, :cpu_temperature, self) end context.readline_match_block(/MainBoard Temperature is (?<mainboard_temperature>\d+)/) do |block| block.warning_serious(env, :mainboard_temperature, self) end end end
Version data entries
18 entries across 18 versions & 1 rubygems