Class: Tmxed::Parser::Json

Inherits:
Object
  • Object
show all
Defined in:
lib/tmxed/parsers/json.rb

Overview

Parses the JSON formatted output from Tiled.

Instance Attribute Summary collapse

Instance Method Summary collapse

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)
  @options = options
end

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



8
9
10
# File 'lib/tmxed/parsers/json.rb', line 8

def options
  @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