class TTY::Command::DryRunner

Attributes

cmd[R]

Public Class Methods

new(cmd, printer) click to toggle source
# File lib/tty/command/dry_runner.rb, line 10
def initialize(cmd, printer)
  @cmd     = cmd
  @printer = printer
end

Public Instance Methods

run!(*) click to toggle source

Show command without running

@api public

# File lib/tty/command/dry_runner.rb, line 18
def run!(*)
  cmd.to_command
  message = "#{@printer.decorate('(dry run)', :blue)} " +
            @printer.decorate(cmd.to_command, :yellow, :bold)
  @printer.write(cmd, message, cmd.uuid)
  Result.new(0, '', '')
end