Class: HPrevalence::EngineBuilder
- Inherits:
-
Object
- Object
- HPrevalence::EngineBuilder
- Defined in:
- lib/hprevalence.rb
Class Method Summary collapse
Class Method Details
.build(target_dir, marshaller = DefaultMarshaller.new(), iomanager = FileIOManager.new(target_dir), model_serializer = DefaultModelSerializer.new(iomanager, marshaller), &system_init) ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/hprevalence.rb', line 14 def self.build( target_dir, marshaller = DefaultMarshaller.new(), iomanager = FileIOManager.new(target_dir), model_serializer = DefaultModelSerializer.new(iomanager, marshaller), &system_init ) ensure_dir( target_dir ) system = system_init.call raise 'System nil ?' if system.nil? SimpleEngine.new( target_dir, system, iomanager, marshaller, model_serializer ) end |