Sha256: 212e3e50f0ed5d01f09fa1fcabe80c27065214f0365239c479106f916f6d126f
Contents?: true
Size: 614 Bytes
Versions: 3
Compression:
Stored size: 614 Bytes
Contents
module CommandButler class LineDetailDecorator def self.decoration(command:command) res = "" res += " note: #{command.params["description"]}\n" unless command.params["description"].nil? res += " original : #{command.original_command} " if command.replaced? command.params.each_pair do |k,v| next if %w(chdir description original_command command need_confirm).include? k next if v.nil? res += " / "if 0 < res.size res += " #{k}: #{v.nil?? '-' : v}" end res = " " + res if 0 < res.size "\e[34m" + res + "\e[0m" end end end
Version data entries
3 entries across 3 versions & 1 rubygems