class Psych::Visitors::YAMLTree::Registrar
:nodoc:
def id_for target
def id_for target @obj_to_id[target.object_id] ||= (@counter += 1) end
def initialize
def initialize @obj_to_id = {} @obj_to_node = {} @counter = 0 end
def key? target
def key? target @obj_to_node.key? target.object_id end
def node_for target
def node_for target @obj_to_node[target.object_id] end
def register target, node
def register target, node @obj_to_node[target.object_id] = node end