Method: ASE::Reader::InstanceMethods#read!
- Defined in:
- lib/ase/reader.rb
#read! ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/ase/reader.rb', line 23 def read! raise "Must specify an output file" if @file.nil? @file = File.new(@file, 'rb') # Signature and version, who cares? # Okay maybe we should validate this in the future. @file.seek 8, IO::SEEK_CUR block_count = @file.read_ulong @palette = Palette.new(:default) read_section until @file.eof? add_palette @palette if @palettes.length == 0 @palette = nil @file.close end |