Class: Rbk::Cli::Archiver

Inherits:
Object
  • Object
show all
Defined in:
lib/rbk/cli.rb

Instance Method Summary collapse

Constructor Details

#initialize(shell = Shell.new) ⇒ Archiver

Returns a new instance of Archiver.



50
51
52
# File 'lib/rbk/cli.rb', line 50

def initialize(shell=Shell.new)
  @shell = shell
end

Instance Method Details

#create(path) ⇒ Object



54
55
56
57
58
# File 'lib/rbk/cli.rb', line 54

def create(path)
  archive = %(#{path}.tar.gz)
  @shell.exec(%(tar czf #{archive} #{path}))
  archive
end