Class: Bubing::BundlerFactory

Inherits:
Object
  • Object
show all
Defined in:
lib/bubing/bundler_factory.rb

Instance Method Summary collapse

Instance Method Details

#build(filename, directory, **options) ⇒ Object



3
4
5
6
7
8
9
10
11
12
# File 'lib/bubing/bundler_factory.rb', line 3

def build(filename, directory, **options)
  info = Bubing::BinaryInfo.new(filename)
  options[:interpreter] = info.interpreter
  case info.type
  when :executable
    Bubing::ExecutableBundler.new(filename, directory, **options)
  when :shared_object
    Bubing::SharedObjectBundler.new(filename, directory, **options)
  end
end