module Tmxed
Constants
- VERSION
Public Instance Methods
parse(filename,options={})
click to toggle source
Parse the specified TMX file and return a Map
that was found.
# File lib/tmxed.rb, line 14 def parse(filename,options={}) options[:format] = File.extname(filename)[1..-1] unless options[:format] file_contents = File.read(filename) contents = parser(options).parse(file_contents) Map.new contents.merge(contents: contents) end
Private Instance Methods
parser(options)
click to toggle source
# File lib/tmxed.rb, line 23 def parser(options) format = options[:format].to_sym parsers[format].new(options) end
parsers()
click to toggle source
# File lib/tmxed.rb, line 28 def parsers Parsers.parsers end