Class: Pike::RBA::Builder

Inherits:
Object
  • Object
show all
Defined in:
lib/pike/rba/builder.rb

Class Method Summary collapse

Class Method Details

.build(target_file) ⇒ Object

Builds an .rba file



11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/pike/rba/builder.rb', line 11

def self.build(target_file)
  FileUtils.touch(target_file)
  tarfile = File.open(target_file, 'w')

  tar_stream = StringIO.new
  tar_stream = build_tar_file(tar_stream)
  gzipped_tar_stream = gzip(tar_stream)

  tarfile.write gzipped_tar_stream.string

  tarfile.close
end