lib/scissor/sound_file.rb in youpy-scissor-0.0.17 vs lib/scissor/sound_file.rb in youpy-scissor-0.0.18

- old
+ new

@@ -2,19 +2,19 @@ require 'pathname' require 'riff/reader' module Scissor class SoundFile - SUPPORTED_FORMAT = %w/mp3 wav/ + SUPPORTED_FORMATS = %w/mp3 wav/ class Error < StandardError; end class UnknownFormat < Error; end def initialize(filename) @filename = Pathname.new(filename) @ext = @filename.extname.sub(/^\./, '').downcase - unless SUPPORTED_FORMAT.include?(@ext) + unless SUPPORTED_FORMATS.include?(@ext) raise UnknownFormat end end def length