Class: PerfectTOML::Parser

Inherits:
Object
  • Object
show all
Defined in:
lib/perfect_toml.rb

Overview

:nodoc:

Defined Under Namespace

Classes: Node

Instance Method Summary collapse

Constructor Details

#initialize(src, symbolize_names: false) ⇒ Parser

Returns a new instance of Parser.



307
308
309
310
311
# File 'lib/perfect_toml.rb', line 307

def initialize(src, symbolize_names: false)
  @s = StringScanner.new(src)
  @symbolize_names = symbolize_names
  @root_node = @topic_node = Node.new(1, nil)
end

Instance Method Details

#parseObject



313
314
315
# File 'lib/perfect_toml.rb', line 313

def parse
  parse_toml
end