Class: Revamp::Application
- Inherits:
-
Object
- Object
- Revamp::Application
- Defined in:
- lib/revamp/application.rb
Overview
A main application class
Instance Method Summary collapse
-
#initialize(options) ⇒ Application
constructor
A new instance of Application.
- #run! ⇒ Object
Constructor Details
#initialize(options) ⇒ Application
Returns a new instance of Application.
7 8 9 10 11 12 |
# File 'lib/revamp/application.rb', line 7 def initialize() @options = @filenames = [:filenames] @format = :rpm @log = Revamp.logger end |
Instance Method Details
#run! ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/revamp/application.rb', line 14 def run! converted = [] @filenames.each do |file| @log.info("Processing file: #{file} ...") parser = Revamp::Parser::PuppetTarball.new(file) model = parser.parse persister = build_persister target = persister.persist(model) report(converted, persister, target) end @log.info("#{converted.size} files converted.") end |