Class: Source::War::Factory

Inherits:
Base::Factory show all
Defined in:
lib/gpm/source/war.rb

Constant Summary

Constants inherited from Base::Factory

Base::Factory::GLOB_REGEXP

Instance Attribute Summary

Attributes inherited from Base::Factory

#directory

Attributes included from HasOptionMethods

#options

Instance Method Summary collapse

Methods inherited from Base::Factory

#files_provider

Methods included from HasOptionMethods

included

Constructor Details

#initialize(warfile, options = {}) ⇒ Factory

Returns a new instance of Factory.



34
35
36
37
38
# File 'lib/gpm/source/war.rb', line 34

def initialize(warfile, options={})
  @warfile = File.expand_path(warfile)
  @effective_pom_file_reader = effective_pom_file_reader_class.new(@warfile, options)
  super(File.dirname(@warfile),options)
end

Instance Method Details

#createObject



44
45
46
# File 'lib/gpm/source/war.rb', line 44

def create
  Maven.new(files_provider,options,@effective_pom_file_reader)
end

#effective_pom_file_reader_classObject



40
41
42
# File 'lib/gpm/source/war.rb', line 40

def effective_pom_file_reader_class
  PomFromWarFileReader
end

#files_providersObject



48
49
50
# File 'lib/gpm/source/war.rb', line 48

def files_providers
  super + [FilesFromDirectoryProvider.new(directory, [File.basename(@warfile)])]
end