Sha256: 92776b7f5855a79a7d1cdadead6feeb30cb64459489a3831587922e515261f1c
Contents?: true
Size: 767 Bytes
Versions: 18
Compression:
Stored size: 767 Bytes
Contents
#coding=utf-8 require "aio/core" class Aio::Module::Cmd::H3C::DisplayClock < Aio::Module::Cmd::H3C include Aio::Module def initialize super({ :cmd_full => "display clock", :cmd_short => "dis clo", :author => "Elin", :description => "This is H3C Command# display clock", :ranking => Ranking_1, :platform => "all", }) end def parse context = self.context.dup clock = {} useful[:clock] = clock context.readline_match_block(/(?<time>[^\s]+) (?<zone>[^\s]+) (?<week>[^\s]+) (?<month>\d+)\/(?<day>\d+)\/(?<year>\d+)/) do |block| block.update(clock, :time) block.update(clock, :zone) block.update(clock, :week) block.update(clock, :year) block.update(clock, :month) block.update(clock, :day) end end end
Version data entries
18 entries across 18 versions & 1 rubygems