Class: MetaBuild::Extractor::ExtractorFactory
- Inherits:
-
Object
- Object
- MetaBuild::Extractor::ExtractorFactory
- Defined in:
- lib/meta_build/extractor/extractor_factory.rb
Class Method Summary collapse
Class Method Details
.build(options = {}) ⇒ Object
7 8 9 10 11 12 13 14 15 |
# File 'lib/meta_build/extractor/extractor_factory.rb', line 7 def build( = {}) ext = File.extname([:file]).sub /\A\./, '' case ext when 'ear' then EarExtractor.new when 'war' then WarExtractor.new when 'jar' then JarExtractor.new else raise MetaBuild::Exceptions::MetaBuildException.new "Could not find suitable extractor to '#{ext.upcase}' type." end end |