Module: Stretto::JFugueFormatParser

Defined in:
lib/stretto/util/jfugue_format_parser.rb

Overview

Class Method Summary collapse

Class Method Details

.parse(jfugue_file) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/stretto/util/jfugue_format_parser.rb', line 6

def self.parse(jfugue_file)
  begin
    music_string = ""
    until jfugue_file.eof
      line = jfugue_file.readline
      music_string << ' ' + line unless line.blank? or line[0, 1] == "#"
    end
    music_string
  ensure
    jfugue_file.close
  end
end