Class: Avm::Files::Appendable::TarOutputCommand
- Inherits:
-
ResourceBase
- Object
- ResourceBase
- Avm::Files::Appendable::TarOutputCommand
- Defined in:
- lib/avm/files/appendable/tar_output_command.rb
Instance Attribute Summary collapse
-
#command ⇒ Object
readonly
Returns the value of attribute command.
Instance Method Summary collapse
-
#initialize(appender, command) ⇒ TarOutputCommand
constructor
A new instance of TarOutputCommand.
- #write_on(target_dir) ⇒ Object
Constructor Details
#initialize(appender, command) ⇒ TarOutputCommand
Returns a new instance of TarOutputCommand.
13 14 15 16 |
# File 'lib/avm/files/appendable/tar_output_command.rb', line 13 def initialize(appender, command) super(appender) @command = command end |
Instance Attribute Details
#command ⇒ Object (readonly)
Returns the value of attribute command.
11 12 13 |
# File 'lib/avm/files/appendable/tar_output_command.rb', line 11 def command @command end |
Instance Method Details
#write_on(target_dir) ⇒ Object
18 19 20 21 22 |
# File 'lib/avm/files/appendable/tar_output_command.rb', line 18 def write_on(target_dir) command.pipe( ::EacRubyUtils::Envs.local.command('tar', '-xf', '-', '-C', target_dir) ).execute! end |