Sha256: 653a2a5921df761466ad8e2a4cd46813109fe1d6abfd1164f23efe01e70a61ad
Contents?: true
Size: 520 Bytes
Versions: 1
Compression:
Stored size: 520 Bytes
Contents
# encoding: UTF-8 module TmxParser class Document include Enumerable attr_reader :string_or_file_handle def initialize(string_or_file_handle) @string_or_file_handle = string_or_file_handle end def each(&block) if block_given? listener = Listener.new(&block) document = SaxDocument.new(listener) parser = Nokogiri::XML::SAX::Parser.new(document) parser.parse(string_or_file_handle) else to_enum(__method__) end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
tmx-parser-1.0.0 | lib/tmx-parser/document.rb |