Class: Visage::ISO

Inherits:
Object
  • Object
show all
Defined in:
lib/visage/iso.rb

Instance Method Summary collapse

Constructor Details

#initialize(source_file, destination) ⇒ ISO

Initialize the ISO

+options+ is a Hash containing ISO building details

Returns ISO



9
10
11
12
13
14
15
# File 'lib/visage/iso.rb', line 9

def initialize( source_file, destination )
  @source = source_file.gsub( /\s/, '\ ' )
  @name = File.basename( source_file )
  @name = @name.sub( /\.cdr|\.dvdmedia/, '' )
  @name = @name.gsub( /\s/, '\ ' )
  @destination_file_name = File.join( destination, @name )
end

Instance Method Details

#process(test = false) ⇒ Object

Generate the iso file



18
19
20
21
22
23
24
25
# File 'lib/visage/iso.rb', line 18

def process( test = false )
  command = "hdiutil makehybrid -udf -udf-volume-name #{@name} -o #{@destination_file_name} #{@source}"
  if( test )
    puts command
  else  
    system( command )
  end
end