Sha256: 951ef2a15364d3483a61570dbc58b9447c6e7dd9e61862aaf8bfe318a025a058

Contents?: true

Size: 394 Bytes

Versions: 4

Compression:

Stored size: 394 Bytes

Contents

module RakeUp
  module Shell    
    class << self
      # When true, commands will be echoed before execution
      def echo_commands=(on_off)
        @echo_commands = on_off
      end
      
      def echo_commands?
        @echo_commands
      end
      
      def execute(command)
        puts "Executing: `#{command}`" if echo_commands?
        system(command)
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rakeup-1.2.0 lib/rakeup/shell.rb
rakeup-1.1.0 lib/rakeup/shell.rb
rakeup-1.0.1 lib/rakeup/shell.rb
rakeup-1.0.0 lib/rakeup/shell.rb