class Cult::Bundle
Attributes
tar[R]
Public Class Methods
new(io) { |self| ... }
click to toggle source
# File lib/cult/bundle.rb, line 7 def initialize(io, &block) @tar = Gem::Package::TarWriter.new(io) if block_given? begin yield self ensure @tar.close @tar = nil end end end
Public Instance Methods
add_file(project, role, node, transferable)
click to toggle source
# File lib/cult/bundle.rb, line 19 def add_file(project, role, node, transferable) data = transferable.contents(project, role, node, pwd: role.path) tar.add_file(transferable.remote_path, transferable.file_mode) do |io| io.write(data) end end