Class: Visage::Converter
- Inherits:
-
Object
- Object
- Visage::Converter
- Defined in:
- lib/visage/converter.rb
Instance Method Summary collapse
-
#initialize(source, destination, test = false) ⇒ Converter
constructor
A new instance of Converter.
- #process ⇒ Object
Constructor Details
#initialize(source, destination, test = false) ⇒ Converter
Returns a new instance of Converter.
9 10 11 12 13 |
# File 'lib/visage/converter.rb', line 9 def initialize( source, destination, test = false ) @source = source @destination = destination @test = test end |
Instance Method Details
#process ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/visage/converter.rb', line 15 def process if( Visage.valid_source_file?( @source ) ) iso = Visage::ISOGenerator.new( @source, @destination ) iso.process( @test ) else Dir.open( @source ).entries.each do | file | if( Visage.valid_source_file?( file ) ) iso = Visage::ISOGenerator.new( File.join( @source, file ), @destination ) iso.process( @test ) end end end end |