class GithubBackup::Shell
Attributes
debug[R]
Public Class Methods
new(opts = {})
click to toggle source
# File lib/github-backup/shell.rb, line 5 def initialize(opts = {}) @debug = opts[:debug] || false end
Public Instance Methods
run(command)
click to toggle source
# File lib/github-backup/shell.rb, line 9 def run(command) puts "EXECUTING: #{command}" if debug IO.popen(command, 'r') do |io| output = io.read puts "OUTPUT:" if debug puts output if debug end end