Module: ToonToJson

Defined in:
lib/toon_to_json.rb,
lib/toon_to_json/decoder.rb

Defined Under Namespace

Classes: Decoder, Error

Class Method Summary collapse

Class Method Details

.decode(toon_str) ⇒ Object

Decode a TOON-formatted string into a Ruby object

Parameters:

  • toon_str (String)

    The TOON-formatted string to decode

Returns:

  • (Object)

    The decoded Ruby object (Hash, Array, or primitive)



11
12
13
# File 'lib/toon_to_json.rb', line 11

def self.decode(toon_str)
  Decoder.new.decode(toon_str)
end