Class: Tmx::Parser::Unknown

Inherits:
Object
  • Object
show all
Defined in:
lib/tmx/parsers/unknown.rb

Overview

The Unknown Parser is used to generate an error when the format is not supported or unknown.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ Unknown

Returns a new instance of Unknown.



11
12
13
# File 'lib/tmx/parsers/unknown.rb', line 11

def initialize(options)
  @options = options
end

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



9
10
11
# File 'lib/tmx/parsers/unknown.rb', line 9

def options
  @options
end

Instance Method Details

#parse(contents) ⇒ Object



15
16
17
# File 'lib/tmx/parsers/unknown.rb', line 15

def parse(contents)
  raise "Unknown Parser Type: Could not find an available parser for format #{options[:format]}"
end