class Blix::Cli::CommandOperation
create a file system directory
Attributes
command[R]
path[R]
Public Class Methods
new(path, command, desc)
click to toggle source
# File lib/blix/cli/operations/command.rb, line 12 def initialize(path, command, desc) @path = path @command = command @desc = desc end
Public Instance Methods
description()
click to toggle source
# File lib/blix/cli/operations/command.rb, line 18 def description @desc || "run command: #{command}" end
run()
click to toggle source
# File lib/blix/cli/operations/command.rb, line 22 def run Dir.chdir(path) do std, err, stat = Open3.capture3("#{command}") unless stat.success? puts "----------------------------------------" puts err puts "----------------------------------------" end end end
undo()
click to toggle source
# File lib/blix/cli/operations/command.rb, line 33 def undo end