7 attributes = ["@anchor","@tag","@implicit","@value"] & self.instance_variables
8 args = attributes.collect {|val| "#{val[1..-1]}=" + eval("#{val}").to_s}.join(", ")
9 "#{self.class.name}(#{args})"
11 def __is_node; false; end
12 def __is_collection_start; false; end
13 def __is_collection_end; false; end
14 def __is_stream_start; false; end
15 def __is_stream_end; false; end
16 def __is_document_start; false; end
17 def __is_document_end; false; end
18 def __is_alias; false; end
19 def __is_scalar; false; end
20 def __is_sequence_start; false; end
21 def __is_sequence_end; false; end
22 def __is_mapping_start; false; end
23 def __is_mapping_end; false; end
26 class NodeEvent < Event
28 def initialize(anchor)
31 def __is_node; true; end
34 class CollectionStartEvent < NodeEvent
35 attr_reader :tag, :implicit, :flow_style
36 def initialize(anchor,tag,implicit,flow_style=nil)
40 @flow_style = flow_style
42 def __is_collection_start; true; end
45 class CollectionEndEvent < Event
46 def __is_collection_end; true; end
49 class StreamStartEvent < Event
51 def initialize(encoding=nil)
54 def __is_stream_start; true; end
57 class StreamEndEvent < Event
58 def __is_stream_end; true; end
61 class DocumentStartEvent < Event
62 attr_reader :explicit, :version, :tags
63 def initialize(explicit=nil,version=nil,tags=nil)
68 def __is_document_start; true; end
71 class DocumentEndEvent < Event
73 def initialize(explicit=nil)
76 def __is_document_end; true; end
79 class AliasEvent < NodeEvent
80 def __is_alias; true; end
83 class ScalarEvent < NodeEvent
84 attr_reader :tag, :style, :value, :implicit
85 def initialize(anchor,tag,implicit,value,style=nil)
92 def __is_scalar; true; end
95 class SequenceStartEvent < CollectionStartEvent
96 def __is_sequence_start; true; end
99 class SequenceEndEvent < CollectionEndEvent
100 def __is_sequence_end; true; end
103 class MappingStartEvent < CollectionStartEvent
104 def __is_mapping_start; true; end
107 class MappingEndEvent < CollectionEndEvent
108 def __is_mapping_end; true; end