Class: Visage::ISO
- Inherits:
-
Object
- Object
- Visage::ISO
- Defined in:
- lib/visage/iso.rb
Instance Method Summary collapse
-
#initialize(source_file, destination) ⇒ ISO
constructor
Initialize the ISO
optionsis a Hash containing ISO building details. -
#process(test = false) ⇒ Object
Generate the iso file.
Constructor Details
#initialize(source_file, destination) ⇒ ISO
Initialize the ISO
++ 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 |