class TomlRB::Table
Public Class Methods
new(dotted_keys)
click to toggle source
# File lib/toml-rb/table.rb, line 3 def initialize(dotted_keys) @dotted_keys = dotted_keys end
Public Instance Methods
accept_visitor(parser)
click to toggle source
# File lib/toml-rb/table.rb, line 27 def accept_visitor(parser) parser.visit_table self end
ensure_key_not_defined(visited_keys)
click to toggle source
Fail if the key was already defined with a ValueOverwriteError
# File lib/toml-rb/table.rb, line 22 def ensure_key_not_defined(visited_keys) fail ValueOverwriteError.new(full_key) if visited_keys.include?(full_key) visited_keys << full_key end
full_key()
click to toggle source
# File lib/toml-rb/table.rb, line 31 def full_key @dotted_keys.join('.') end