Sha256: a75b5d857410f9edbf29bfb13323c374142415a1fc68905265c367bd3be440a4
Contents?: true
Size: 562 Bytes
Versions: 2
Compression:
Stored size: 562 Bytes
Contents
module CommandButler class ResultDecorator def self.decoration_frame(command:command,index:index, &block) puts head = "-- [#{index+1}] #{command.command || command.chdir} " + "-" * 30 yield puts "-" * head.length end def self.decoration_stdout(stdout: stdout, status:status) puts stdout puts "\e[32m success status:" + status.to_i.to_s + "\e[0m" end def self.decoration_stderr(stderr: stderr, status:status) puts stderr puts "\e[31m error status:" + status.to_i.to_s+ "\e[0m" end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
command_butler-0.0.3 | lib/command_butler/result_decorator.rb |
command_butler-0.0.2 | lib/command_butler/result_decorator.rb |