Module: RakeUp::Shell

Defined in:
lib/rakeup/shell.rb

Class Method Summary collapse

Class Method Details

.echo_commands=(on_off) ⇒ Object

When true, commands will be echoed before execution



5
6
7
# File 'lib/rakeup/shell.rb', line 5

def echo_commands=(on_off)
  @echo_commands = on_off
end

.echo_commands?Boolean

Returns:

  • (Boolean)


9
10
11
# File 'lib/rakeup/shell.rb', line 9

def echo_commands?
  @echo_commands
end

.execute(command) ⇒ Object



13
14
15
16
# File 'lib/rakeup/shell.rb', line 13

def execute(command)
  puts "Executing: `#{command}`" if echo_commands?
  system(command)
end