Class: Tmx::Parser::Tmx
- Inherits:
-
Object
- Object
- Tmx::Parser::Tmx
- Defined in:
- lib/tmx/parsers/tmx.rb
Overview
Parses the TMX formatted output from Tiled.
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
-
#initialize(options) ⇒ Tmx
constructor
A new instance of Tmx.
- #parse(contents) ⇒ Object
Constructor Details
#initialize(options) ⇒ Tmx
Returns a new instance of Tmx.
14 15 16 |
# File 'lib/tmx/parsers/tmx.rb', line 14 def initialize() @options = end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
12 13 14 |
# File 'lib/tmx/parsers/tmx.rb', line 12 def @options end |
Instance Method Details
#parse(contents) ⇒ Object
18 19 20 21 |
# File 'lib/tmx/parsers/tmx.rb', line 18 def parse(contents) results = Nokogiri::XML(contents) convert_to_hash(results) end |