Class: Rbk::Cli::Archiver
- Inherits:
-
Object
- Object
- Rbk::Cli::Archiver
- Defined in:
- lib/rbk/cli.rb
Instance Method Summary collapse
- #create(path) ⇒ Object
-
#initialize(shell = Shell.new) ⇒ Archiver
constructor
A new instance of Archiver.
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 |