Class: Psych::Pure::Emitter::Node

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

Overview

The base class for all emitter nodes. We need to build a tree of nodes here in order to support dumping repeated objects as anchors and aliases, since we may find that we need to add an anchor after the object has already been flushed.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value, psych_node) ⇒ Node

Returns a new instance of Node.



4104
4105
4106
4107
4108
# File 'lib/psych/pure.rb', line 4104

def initialize(value, psych_node)
  @value = value
  @psych_node = psych_node
  @anchor = nil
end

Instance Attribute Details

#psych_nodeObject (readonly)

Returns the value of attribute psych_node.



4102
4103
4104
# File 'lib/psych/pure.rb', line 4102

def psych_node
  @psych_node
end

#valueObject (readonly)

Returns the value of attribute value.



4102
4103
4104
# File 'lib/psych/pure.rb', line 4102

def value
  @value
end

Instance Method Details

#accept(visitor) ⇒ Object



4110
4111
4112
# File 'lib/psych/pure.rb', line 4110

def accept(visitor)
  raise
end