Sha256: 8ecfb7c1f3bb4a34b85380cf924ad4318072dee14db1660b52add531222ed431

Contents?: true

Size: 435 Bytes

Versions: 6

Compression:

Stored size: 435 Bytes

Contents

# encoding: utf-8

module TTY
  class Command
    class DryRunner
      def initialize(printer)
        @printer = printer
      end

      def run(cmd)
        cmd.to_command
        message = "#{@printer.decorate('(dry run)', :blue)} "
        message << @printer.decorate(cmd.to_command, :yellow, :bold)
        @printer.write(message, cmd.uuid)
        Result.new(0, '', '')
      end
    end # DryRunner
  end # Command
end # TTY

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
tty-command-0.3.3 lib/tty/command/dry_runner.rb
tty-command-0.3.2 lib/tty/command/dry_runner.rb
tty-command-0.3.1 lib/tty/command/dry_runner.rb
tty-command-0.3.0 lib/tty/command/dry_runner.rb
tty-command-0.2.0 lib/tty/command/dry_runner.rb
tty-command-0.1.0 lib/tty/command/dry_runner.rb