Class: Tmxed::Parser::Json
- Inherits:
-
Object
- Object
- Tmxed::Parser::Json
- Defined in:
- lib/tmxed/parsers/json.rb
Overview
Parses the JSON formatted output from Tiled.
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
-
#initialize(options) ⇒ Json
constructor
A new instance of Json.
- #parse(contents) ⇒ Object
Constructor Details
#initialize(options) ⇒ Json
Returns a new instance of Json.
10 11 12 |
# File 'lib/tmxed/parsers/json.rb', line 10 def initialize() @options = end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
8 9 10 |
# File 'lib/tmxed/parsers/json.rb', line 8 def @options end |
Instance Method Details
#parse(contents) ⇒ Object
14 15 16 |
# File 'lib/tmxed/parsers/json.rb', line 14 def parse(contents) JSON.parse(contents) end |