Method: MTK::IO::Notation#initialize

Defined in:
lib/mtk/io/notation.rb

#initialize(file, options = {}) ⇒ Notation

Returns a new instance of Notation.

Raises:

  • (ArgumentError)


20
21
22
23
24
25
26
27
28
# File 'lib/mtk/io/notation.rb', line 20

def initialize(file, options={})
  @file = file
  @options = options

  @format = File.extname(file)[1..-1].downcase
  raise ArgumentError.new("Invalid file format '#{@format}'") unless VALID_FORMATS.include? @format

  @dpi = options[:dpi]
end