class MetaBuild::Parser::ParserFactory
Public Class Methods
build(options = {})
click to toggle source
# File lib/meta_build/parser/parser_factory.rb, line 7 def build(options = {}) ext = File.extname(options[:file]).sub /\A\./, '' case ext when 'ear' then EarParser.new options when 'war' then WarParser.new options when 'jar' then JarParser.new options else raise MetaBuild::Exceptions::MetaBuildException.new "Could not find suitable parser to '#{ext.upcase}' type." end end