module Velcro::Shell

Handle interactions with the shell

Public Class Methods

included(base) click to toggle source
# File lib/velcro/concerns/shell.rb, line 4
def self.included(base)
  base.send(:attr_reader, :dryrun)
end

Public Instance Methods

dryrun!() click to toggle source
# File lib/velcro/concerns/shell.rb, line 16
def dryrun!
  @dryrun = true
end
dryrun?() click to toggle source
# File lib/velcro/concerns/shell.rb, line 12
def dryrun?
  @dryrun == true
end
shell(command) click to toggle source
# File lib/velcro/concerns/shell.rb, line 8
def shell(command)
  dryrun? ? puts(command) : system(command)
end